Dezina Posted on Nov 27, 2021 Repeat array element n times const myArray = [ '3:00', '4:00'] const repeat = (a, n) => Array(n).fill(a).flat(1) console.log( repeat(myArray, 3) ) Top comments (0) Subscribe Submit Preview Dismiss Code of Conduct • Report abuse
Top comments (0)