摘要: 今天写了一个获取数组随机值的方法给同事,结果妹子同事一直不能理解为什么是Math.floor,而不用Math.round 方法:Array.prototype.getRandomItem=function(){ return this[Math.floor(Math.random()*this.le 阅读全文
posted @ 2016-10-28 11:11 hahaha222 阅读(3424) 评论(0) 推荐(0)