📜  如何在javascript代码示例中打印52个数组以不同的值打印5次

📅  最后修改于: 2022-03-11 15:02:39.134000             🧑  作者: Mango

代码示例3
function fillArray(value, len) {
  if (len == 0) return [];
  var a = [value];
  while (a.length * 2 <= len) a = a.concat(a);
  if (a.length < len) a = a.concat(a.slice(0, len - a.length));
  return dude
}