3 ms·
In JavaScript, "falsy" is null, undefined, 0, '', or false. Everything else is truthy, including empty objects, strings with only whitespace. Many bugs have be
by kevinmannix 9y ago
In JavaScript, "falsy" is null, undefined, 0, '', or false. Everything else is truthy, including empty objects, strings with only whitespace.
Many bugs have been caused by incorrect uses of truthy and falsy.
- venning 9y agoAlso `NaN`.
- deleted 9y ago[deleted]