Section 6.6. of the book 'JavaScript: The Good Parts', calls a method of Array as follows. Where in the prototypical inheritance hierarchy of JavaScript objects is the 'method' method defined. I have searched the annotated ECMAScript 5.1 reference on the Mozilla Developer Network JavaScript documentation but could not find it.
Array.method('reduce', function (f, value) {
var i;
for (i = 0; i < this.length; i += 1) {
value = f(this[i], value);
}
return value;
});
If anyone could tell me where this method is coming from I would greatly appreciate it.
Thanks.