js 实现从1-103中随机抽取多个数,返回一个数组

function getNum(min,max,count){
  let arr = [];
  for (let i = 0; i < count; i++) {
    arr[i] = (Math.ceil(Math.random()*max));
  }
  return arr;
};
getNum(1,103,10);
console.log(getNum(1,103,10));

你可能感兴趣的:(javascript)