JS随机数、JS随机整数
0 1 2 3 4 5 |
function myRandom(n, m) { var random = Math.floor(Math.random()*(m-n+1)+n); return random; } console.log(myRandom(100, 200)); |
JS随机数、JS随机整数
0 1 2 3 4 5 |
function myRandom(n, m) { var random = Math.floor(Math.random()*(m-n+1)+n); return random; } console.log(myRandom(100, 200)); |