Doesn't it also check for null not just undefined? Isn't that the whole point?
falsy values are: "", 0, null, undefined, NaN and false
Everything else is truthy.
I kind of wish that Invalid Date (invalidDt.valueOf() === NaN), empty arrays, and objects without any properties were also falsy sometimes. Though I also wish that sometimes 0 was easier to separate from other falsy values.