let red = []
let blue = 1
function getNum(min, max) {
return Math.floor(Math.random() * (max - min+1) + min)
}
while (red.length < 6) {
red.push(getNum(1, 33))
red = […new Set(red)]
}
blue = getNum(1,16)
console.log(red.sort((a,b)=>a-b).concat(blue))
生成双色球
猜你喜欢
转载自blog.csdn.net/qq_42975676/article/details/131265643
今日推荐
周排行