What is the use of isNaN function? …

Forums JavaScriptWhat is the use of isNaN function? …
Staff asked 3 years ago

Answers (1)

Add Answer
Hardik Ghevariya Marked As Accepted
Staff answered 3 years ago

isNaN() function returns true if a value is NaN:

Example:

console.log(isNaN("123"));   //false
console.log(isNaN("ABC"));   //true
console.log(isNaN(123));   //false

 

Subscribe

Select Categories