How to validate the given input is a number or not using Javascript?

isNan() function in Javascript

The function isNan() is used to determines whether a value is not a number. It will returns the true if the value is not a number. Otherwise it returns false which means the given input is a number.

Syntax

The value should be given as parameter in the isNan() function. Then it is tested by isNan() function and returns the true/false value based on the input.

Example for number validation in Javascript

Example for isNan() function in Javascript
Example for isNan() function in Javascript

Javascript code with isNan() function