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

What is the output?

console.log('5' - 2, '5' + 2);
  1. 3 52
  2. 52 3
  3. 3 7
  4. 7 52
- coerces the string to a number; + prefers string concatenation.
Play Problem Solving ▸