how to repeat array of single object in javascript code example
Example: how to repeat an array of objects n times in javascript
const makeRepeated = (arr, repeats) =>
[].concat(...Array.from({ length: repeats }, () => arr));
console.log(makeRepeated([1, 2, 3], 2));