how to check if a var is a number in javascript 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);
}