Array.prototype.myFilter = function(fn){ let arr = [] for(let i = 0;i < this.length;i++){ let item = this[i] if(fn(item,i,this)){ arr.push(item) } } return arr }
Array.prototype.myFilter = function(fn){ let arr = [] for(let i = 0;i < this.length;i++){ let item = this[i] if(fn(item,i,this)){ arr.push(item) } } return arr }