$ ./guess_the_languageProblem Solving — predict the output
Problem Solving — predict the output · hard · #171

What is the output?

console.log(('b' + 'a' + +'a' + 'a').toLowerCase());
  1. banana
  2. baaa
  3. baNaNa
  4. NaN
Unary plus on 'a' yields NaN, which stringifies into the middle.
Play Problem Solving ▸