I have an array, and it has multiple structures, with arrays inside arrays, how can I add all the numbers inside the main array?
arr = [
[1, 2, 3],
[
4, 5, 6,
[
[7, 8, 9],
11, 12, 13,
[14, 15,
[
16, 17, 18
]
]
],
[19, 20]
]
]
I have to ignore the structure, because it's never the same