function ranNun(len){
var number = ['0','1','2','3','4','5','6','7','8','9'];
var result = '';
for(var i = 0; i < len; i++){
var data = Math.ceil(Math.random() * 9);
result += number[data];
}
console.log(result);
return result;
}
ranNun(n);
生成 len 位的随机数function ranNun(len){ var number = ['0','1','2','3','4','5','6','7','8','9']; var result = ''; for(var i = 0; i < len; i++){ var data = Math.ceil(Math.random() * 9)...