javascript check is string number code example
Example 1: javascript is variable a string
if (typeof myVar === 'string'){
//I am indeed a string
}
Example 2: js check if string or int
var myString = "abc123";
var otherString = "123";
/* isInterger() checks if an value repersents an int */
Number.isInteger(myString); //returns false
Number.isInteger(otherString); //returns true