-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Open
Description
`
Object.prototype.map = function(callback){
if(typeof callback !== "function"){
throw new TypeError("param must be a Function")
}
const newObj = {}
for(const key in this){
if(this.hasOwnProperty(key)){
newObj[key] = callback(this[key],key,this)
}
}
return newObj
}
`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels