is string a number js code example
Example 1: js string have number js
var hasNumber = /\d/;
hasNumber.test("ABC33SDF"); //true
hasNumber.test("ABCSDF"); //false
Example 2: javascript check if string is number
function isNumeric(num){
return !isNaN(num)
}
isNumeric("23.33"); //true, checking if string is a number.