Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
ECMAScript 5 defines nine new array methods for iterating,
mapping, filtering, testing, reducing, and searching arrays. Most of the
methods accept a function as their first argument and invoke that function
once for each element (or at least some elements) of the array. In most
cases, the function you supply is invoked with three arguments: the value
of the array element, the index of the array element, and the array
itself. Often, you only need the first of these argument values and can
ignore the second and third values. Most of the ECMAScript 5 array methods
that accept a function as their first argument accept an optional second
argument. If specified, the function is invoked as if it is a method of
....this