📅  最后修改于: 2022-03-11 15:03:54.603000             🧑  作者: Mango
var myMin = 1;
var myMax = 10;
function randomRange(myMin, myMax) {
return Math.floor(Math.random() * (myMax - myMin + 1)) + myMin;
}
console.log(randomRange(myMin, myMax));