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

What is the output?

console.log(['a', 'b'].join('-'));
  1. a-b
  2. ab
  3. a,b
  4. ['a','b']
join uses the given separator; with no argument it would default to a comma.
Play Problem Solving ▸