Contact: aviboots(AT)netvision.net.il
39,943 questions
51,883 answers
573 users
let arr = [1, [2], [3, 4, [5, 6, [7, 8, [9, 10]]]]]; arr = arr.flat(Infinity); console.log(arr); /* run: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] */