Some confusing stuff about JavaScript

Hello @Anindya.

I don’t know where you got that and what you are up to . Be careful about how you use isNaN like that. There is isNaN and Number.isNaN. This is what the folks at MDN say about isNaN. The very first paragraph.

The isNaN() function determines whether a value is NaN or not. Note, coercion inside the isNaN function has interesting rules; you may alternatively want to use Number.isNaN() , as defined in ECMAScript 2015.

Check more below:

1 Like