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

What is the output?

console.log(String([1, [2, 3]]));
  1. 1,2,3
  2. 1,[2,3]
  3. [1,[2,3]]
  4. 1,2 3
Array to string joins with commas and flattens nested arrays the same way.
Play Problem Solving ▸