8
Reply

What is NaN Function in Javascript?

Priti Kumari

Priti Kumari

10y
5.5k
2
Reply

    NaN refers to Not a Number , which is used for identifying wether a variable is having a number or not ?

    Check whether a number is an illegal number or not... Example: 1) var A1 = isNaN(523) .....output:false 2) var B1 = isNaN("12").....output :true

    Not a number ,which used in client side to check input is number or not

    NaN is Not a Number , which is used for identifying that a variable is a number or not ? This function returns true if the value is NaN, and false if not.

    most of the time NaN is used whether the given value is number or not

    that is 'Not a Number' it is use to check the given value is number or not

    It simply means the input you enter NaN(Not a Number)

    The isNaN() function determines whether a value is an illegal number (Not-a-Number). This function returns true if the value is NaN, and false if not. E.g.:- var a = isNaN(123) Out:-false and var e = isNaN("Hello") Out:- true