jsRant asked this 7 years ago

Javascript reliable way to test for NaN

What is the most reliable way to test if a variable is NaN?


Best Answer by mamdouh 4 years ago
You can use the isNaN() function which returns true if a value is not a number and false if it is a number.