const makeRepeated = (arr, repeats) => [].concat(...Array.from({ length: repeats }, () => arr)); console.log(makeRepeated([1, 2, 3], 2));