true / false, and how non-booleans coerce.
- falsy values:
false, 0, '', null, undefined, NaN - everything else is truthy — including
[],{},'0','false' - use
Boolean(x)or!!xto coerce explicitly - guard with truthiness:
if (user) { ... }
See examples/.
List which of 8 given values are truthy.