实现监听数组方法 var ArrayProxy = Object.create(Array.prototype), methods = ['push','pop','shift','unshift','splice','sort','reverse']; function defProtected(obj, key, val, enumerable, configurable) { // 如果是用户添加的方法则不监听 if (obj.hasOwnProperty(key)) return Obj…