undefined is falsey.
null is falsey.
0 is falsey.
The empty string is falsey.
NaN is falsey.
To remember which values are truthy and which are falsey, just memorize the five falsey values—undefined, null, 0, “” and NaN—and remember that everything else is truthy.
- 7. Types, Equality, Conversion and All That Jazz: Serious types
- Publisher: O'Reilly Media, Inc.
- Released: March 2014