Sollicitatievraag bij Innominds Software

prototype based question. add sum method to array

Antwoord op sollicitatievraag

Anoniem

2 dec 2016

Array.prototype.sum = function(){ var total = 0; this.forEach(function(val){ total += val; }); return total; };

15