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

What is the output?

console.log(Object.keys(['a', 'b']));
  1. ['0', '1']
  2. ['a', 'b']
  3. [0, 1]
  4. ['length']
Array indices are object keys, and object keys are strings.
Play Problem Solving ▸