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));
js 实现从1-103中随机抽取多个数,返回一个数组
猜你喜欢
转载自blog.csdn.net/weixin_45634433/article/details/129916828
今日推荐
周排行