📅  最后修改于: 2022-03-11 15:03:54.378000             🧑  作者: Mango
const makeRepeated = (arr, repeats) =>
[].concat(...Array.from({ length: repeats }, () => arr));
console.log(makeRepeated([1, 2, 3], 2));