
Omaran B. answered 10/25/22
Tutor
5
(19)
JavaScript&HTML tutor
Please watch the video
Array.prototype.MapByOmaran=function(fn){
for(let i=0;i<this.length;i++){
this[i]=fn(this[i])
}
return this
}
let arr=[1,2,3,4]
console.log(arr)
console.log(arr.MapByOmaran((a)=>a*3))