js check for number in string code example
Example 1: javascript is variable a string
if (typeof myVar === 'string'){
//I am indeed a string
}
Example 2: javascript check if string is number
function isNumeric(num){
return !isNaN(num)
}
isNumeric("23.33"); //true, checking if string is a number.