Lambda saysTruthy/falsy coercion causes subtle bugs — know the falsy list cold.
Conditions coerce, and the surprises are real: [] and {} are truthy, so if (arr) is true even for an empty array (check arr.length). "0" is truthy but 0 is falsy. Memorize the six falsy values and reach for explicit checks when intent matters.
Power-ups you unlock
Falsy: false, 0, "", null, undefined, NaN
[] and {} are truthy
"0" is truthy; 0 is falsy
Check arr.length, not just arr
The Mutator attacks — common mistakes
if (arr) to test emptiness (always true)
Treating "0" as falsy
|| defaults clobbering valid 0/""
Boss battleShow that an empty array is truthy, then correctly test it for emptiness.