$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · easy · #55

What is the output?

console.log(Boolean([]));
  1. true
  2. false
  3. 0
  4. undefined
Every object is truthy in JavaScript, including an empty array.
Play Problem Solving ▸