You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
280 B
JavaScript
10 lines
280 B
JavaScript
5 years ago
|
function is_number(value)
|
||
|
{
|
||
|
return !isNaN(value) && toString.call(value) === '[object Number]';
|
||
|
}
|
||
|
|
||
|
console.log(is_number(NaN));
|
||
|
|
||
|
console.log(is_number(42.32));
|
||
|
|
||
|
console.log(is_number(72));
|