Puzzle 4 of 15 · Truthiness
Compare Boolean conversion for an empty array and an empty string. Predict each log by considering the type and truthiness of the value. Choose an output below, then check the explanation. No signup needed. Browse puzzles by topic →
1console.log(Boolean([])); 2console.log(Boolean(""));
Predict the console output. Each line is a separate log.
true false
false false
true true
false true