Flattening Arrays in JavaScript — Opening Bags
Apr 12 · 4 min read · Have you seen a normal array like this?
js
[2, 3, 4, 5, 1, 9, 5]
Cool. Now have you seen this?
js
[2, 3, [4, 5, 1], 9, 5]
See that? There's an array sitting inside another array. That's called a nes