how to check if theres a copy of a number in js code example
Example 1: javascript check if variable is number
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}
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