Contact: aviboots(AT)netvision.net.il
31,104 questions
40,777 answers
573 users
let arr = [1, 2, 3, 4, 5]; newarray = arr.flatMap(n => [n * 2]); console.log(newarray); /* run: [2, 4, 6, 8, 10] */