danielewski.dev

Flatten an Array Using Splat

[1, *[*[2, 3], 4]]
# => [1, 2, 3, 4]

[1, [[2, 3], 4]].flatten
# => [1, 2, 3, 4]