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

What is the output?

console.log(Object.entries({ a: 1 }).flat());
  1. ['a', 1]
  2. [['a', 1]]
  3. ['a']
  4. [1]
entries gives [['a',1]] and flat lifts the pair one level.
Play Problem Solving ▸