const myArray = [ '3:00', '4:00']
const repeat = (a, n) => Array(n).fill(a).flat(1)
console.log( repeat(myArray, 3) )
![Cover image for Repeat array element n times](https://media.dev.to/cdn-cgi/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4uks2oc8n7jaxdyqf5a4.png)
For further actions, you may consider blocking this person and/or reporting abuse
const myArray = [ '3:00', '4:00']
const repeat = (a, n) => Array(n).fill(a).flat(1)
console.log( repeat(myArray, 3) )
For further actions, you may consider blocking this person and/or reporting abuse
Marcos Oliveira -
Jordi Henrique Silva -
Jampa Matos -
Danilo Assis -
Top comments (0)