how to check if string is integer in javascript code example
Example 1: how to check if a string is an integer javascript
isNaN(num) // returns true if the variable does NOT contain a valid number
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