js数组

 //push  给数组的最后一位添加数据
       //pop 把数组的最后以为剪切
       //unshift 在数组的第0位添加数据
       //reverse 逆转数组顺序
       //splice srr.splice(从第几位开始截取  截取几位  替换数据)
 
var arr = [];
Array.prototype.push = function (){ for(var i= 0;i<arguments.length ; i++){   this[this.length] = arguments[i]; } return this.length } //模仿系统的push方法
原文地址:https://www.cnblogs.com/punisher999/p/12270964.html