Professional Documents
Culture Documents
net/7qmawbsk/49/
console.log("%cARRAY MAP: OVERRIDE", "color: red; font-weight: bold; font-size:
13px");
Array.prototype.map2 = function(callback) {
let output = [];
this.forEach((item, index) => {
output.push(callback(item, index));
}, this);
return output;
}
const input2 = [
{
name: 'blossom',
color: 'red'
},
{
name: 'bubbles',
color: 'blue'
},
{
name: 'buttercup',
color: 'green'
}
];
return obj;
});
console.log(printPowerPuff);