how to check if anumber is string in js code example
Example 1: js is number
Number.isInteger(value)
Example 2: javascript check if variable is number
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}
Number.isInteger(value)
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}