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

What is the output?

console.log('5' * '2');
  1. 10
  2. '52'
  3. 52
  4. NaN
The * operator has no string meaning, so both sides convert to numbers.
Play Problem Solving ▸