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