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

What is the output?

console.log([1, 2, 3].join("-"));
  1. 1-2-3
  2. 123
  3. [1-2-3]
  4. 1,2,3
join inserts the separator between elements.
Play Problem Solving ▸