Advertisement
728x90
1. isNaN: The global function isNaN converts the argument to a Number and returns true if the resulting value is NaN.
2. Number.isNaN: This method does not convert the argument. But it returns true when the type is a Number and value is NaN.
Let's see the difference with an example,
javascript
1isNaN(‘hello’); // true
2
3Number.isNaN('hello'); // falseAdvertisement
Responsive Ad
🎯 Practice NowRelated Challenge
JavaScript Coding Exercise 80
Test your knowledge with this interactive coding challenge.
Start CodingAdvertisement
728x90
423of476