Contact: aviboots(AT)netvision.net.il
39,941 questions
51,879 answers
573 users
let arr = [ 1, 7, [[3]], [[[2]]], [[[[[[[100]]]]]]] ]; arr = arr.flat(Infinity); console.log(arr); /* run: [ 1, 7, 3, 2, 100 ] */