Leaderboard Archive
Javascript Apr 28, 2026

What is the output?

console.log(Boolean(0))
console.log(Boolean(""))
console.log(Boolean("0"))
A false, false, false
B false, false, true
C true, true, true
D false, true, false
Explanation
In JavaScript, 0 and empty string are falsy — they act like false. But "0" is a string with a character in it, so it is truthy — it acts like true. A common mistake is assuming "0" is false just because the number 0 is false.
📝
Reviewed by CodeShot Editorial
Every challenge is code-reviewed by senior developers to ensure accuracy and real-world relevance. Learn more.

Ready for your shot?

Join thousands of developers solving one logic puzzle every morning.

Solve Today's Challenge →