2018年4月12日

存储十个不相同的随机数

摘要: var roundArr:Array = []; var roundInt:int; while (roundArr.length<10) { roundInt = Math.random() * 10; if (roundArr.indexOf(roundInt) == -1) { roundArr.push(roundInt); } } 阅读全文

posted @ 2018-04-12 15:25 zqiang0803 阅读(123) 评论(0) 推荐(0)

导航