$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · hard · #192
What is the output?
const o = { valueOf: () => 2 }; console.log(o + 1);
3
21
NaN
Error
Coercion tries valueOf before toString, so the object becomes the number 2.
Play Problem Solving ▸
◂ #191
all Problem Solving — predict the output questions
#193 ▸