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

What is logged?

console.log(typeof NaN, typeof []);
  1. number object
  2. NaN array
  3. number array
  4. NaN object
NaN is a number, and every array reports the type 'object'.
Play Problem Solving ▸