NaN : Not A NumberNaN is known as Not A Number
It is a returned value
It is not configurable and not writable.
Example of NaNWhen we will get output as NaN ?
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.