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

What is the output?

console.log([...'abc'].length);
  1. 3
  2. 1
  3. abc
  4. Error
Spreading a string iterates its code points, giving an array of single characters.
Play Problem Solving ▸