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

What is the output?

console.log('abc'.repeat(2).length);
  1. 6
  2. 3
  3. 2
  4. 5
repeat(2) builds 'abcabc', which has six characters.
Play Problem Solving ▸