js check if possible to convert srting to int code example
Example 1: js check if string is integer
function isInt(str) {
return !isNaN(str) && Number.isInteger(parseFloat(str));
}
Example 2: javascript check if string is number
function isNumeric(num){
return !isNaN(num)
}
isNumeric("23.33"); //true, checking if string is a number.