Answers for "javascript check is string number"

13

javascript check if string is number

if (typeof myVar === 'string'){
    //I am indeed a string
}
Posted by: Guest on July-23-2019
-1

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
Posted by: Guest on November-25-2020

Code answers related to "javascript check is string number"

Code answers related to "Javascript"

Browse Popular Code Answers by Language