
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
isNaN Function in JavaScript
The isNaN() function accepts a value and determines whether the given value is a number or not.If so, this method returns true else it returns false. You can also call this method using Number object.
Syntax
Its Syntax is as follows
isNAN(5655);
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var result1 = parseFloat("Ef00A.D3"); document.write(isNaN(result1)); document.write('<br>'); var result2 = Math.log("welcome"); document.write(isNaN(result2)); document.write('<br>'); var result3 = Math.log(1254); document.write(isNaN(result3)); </script> </body> </html>
Output
true true false
Advertisements