Javascript Array filter(changer)
Array.prototype.filter = function(changer){ const newArray = []//from ww w . java 2s . c o m this.forEach((member, index) =>{ newArray.push(changer(member, index, this)) }) return newArray }