📅  最后修改于: 2022-03-11 15:02:37.643000             🧑  作者: Mango
function randomIntFromInterval(min, max) { // min and max included
return Math.floor(Math.random() * (max - min + 1) + min)
}
const rndInt = randomIntFromInterval(1, 6)
console.log(rndInt)
Run code snippetHide results