: If I pass isNaN a string, which isn’t a number, will it return true?
A: It sure will, just as you’d expect. You can expect a variable holding the value NaN, or any other value that isn’t an actual number to result in isNaN returning true (and false otherwise). There are a few caveats to this that you’ll see when we talk about type conversion.
- 7. Types, Equality, Conversion and All That Jazz: Serious types
- Publisher: O'Reilly Media, Inc.
- Released: March 2014