$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · medium · #137

What is the output?

console.log(Boolean(''), Boolean('0'));
  1. false true
  2. true false
  3. false false
  4. true true
Only the empty string is falsy; '0' is a non-empty string.
Play Problem Solving ▸