博客园  :: 首页  :: 新随笔  :: 联系 :: 管理

2012年7月2日

摘要: /** 删除数组中指定索引的数据 **/Array.prototype.deleteAt = function (index) { if (index < 0) { return this; } return this.slice(0, index).concat(this.slice(index + 1, this.length));}/** 数组洗牌 **/Array.prototype.random = function () { var tempArr = [], me = this, t; while (me.length > 0) { ... 阅读全文

posted @ 2012-07-02 22:53 匆匆 阅读(466) 评论(0) 推荐(0) 编辑