$ ./guess_the_language
Problem Solving — predict the output
Problem Solving — predict the output · medium · #67
What is the output?
console.log([1, [2, [3, [4]]]].flat());
[1, 2, [3, [4]]]
[1, 2, 3, [4]]
[1, 2, 3, 4]
[1, [2, [3, [4]]]]
flat() defaults to one level of depth.
Play Problem Solving ▸
◂ #66
all Problem Solving — predict the output questions
#68 ▸