function num(n,m){
//第一种写法
// var mathNum = Math.round(Math.random()*(m-n)+n);
// return mathNum
//第二种写法
return Math.round(Math.random()*(m-n)+n);
}
随机数的两种写法
猜你喜欢
转载自blog.csdn.net/wujinpengjiusan/article/details/89315519
今日推荐
周排行