Contact: aviboots(AT)netvision.net.il
39,943 questions
51,883 answers
573 users
let arr = [ 1, 5, [[2]], [[[7]]], [[[[[[[99]]]]]]] ]; arr = arr.flat(2); console.log(arr); /* run: [ 1, 5, 2, [ 7 ], [ [ [Array] ] ] ] */