Array.flat() & flatMap Playground

A wagon holding an array carries crates on its roof: flat() unpacks one level a step on track 2 up to the depth asked or Infinity. What happens to the holes…

Try it in this playground