how to check whether a value is number or not in js code example
Example: javascript check if variable is number
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}
function isNumber(n) {
return !isNaN(parseFloat(n)) && !isNaN(n - 0);
}