摘要: 首先写游戏的时候,JSON字符串转成OBJECT的时候,希望做个数组随机排序的方法如下: //用Math.random()函数生成0~1之间的随机数与0.5比较,返回-1或1 function randomsort(a, b) { return Math.random()>.5 ? -1 : 1; 阅读全文
posted @ 2016-01-08 10:21 霏霏雪无声 阅读(768) 评论(0) 推荐(0) 编辑