获取随机数

获取数组arr随机下标:
Math.floor(Math.random()*arr.length);
获取n-m的随机整数:
Math.round(Math.random()*(m-n)+n);

评论

暂无评论