filter
The filter function, rather than deleting elements from the existing army, builds up a new array with only the elements that pas the test. This function is pure. It does not modify the array it is given. (standard method on arrays).
Internal workings:
function filter(array, test) {
var passed = [];
for (var i = 0; i [{name: "Carolus Haverbeke", ...}]map
similar to filter (page 95 in E.JS)
internal workings:
function map(array, transform) {
var mapped = [];
for (var i= 0; ireduce
similar to filter (page 96 in E.JS)
function reduce (array, combine, start) {
var current = start;
for (var i = 0; iforEach
function forEach(array, action) {
for (var i = 0; i.isEqual(expected value)
Resolves to true