Actieve werkgever
How would you extend Array in JavaScript so that it could add all the values stored in an array?
Anoniem
Array.prototype.addValues = function(){ var out=0; for (x = 0; x < arr.length; x++){ out = out + arr[x]; } return out; }
This is an exploration of Object prototypes, which demonstrates the level of sophistication with the language.
arr should be this
Volg de bedrijven van je dromen om als eerste op de hoogte te zijn van vacatures en te profiteren van tips van insiders.
Zoek naar vacatures om gepersonaliseerde vacature-aanbevelingen en -updates te krijgen.