NaN : Not A NumberNaN is known as Not A NumberIt is a returned value It is not configurable and not writable. Example of NaNWhen we will get output as NaN ?
Not equal to itselfNaN is the only JavaScript value which is not equal to itself.
The output will be Not Equal
User entered data from an input text box is always a string, so for any mathematical calculation we need to convert them to number by using parseFlot or parseInt. Otherwise we will get NaN as output of any mathematical calculation if we use directly these inputs.
This article is written by plus2net.com team.
![]() |
![]() |