Contact: aviboots(AT)netvision.net.il
39,943 questions
51,883 answers
573 users
const nestedArr = [1, [2, [3, [4, [5]]]]]; console.log(nestedArr.flat(Infinity)); /* run: [ 1, 2, 3, 4, 5 ] */