Array.prototype.* recreate common array methods that take higher order functions Example Array.prototype.myForEach = ... Object.defineProperty(Array.prototype, 'myForEach', { value: ... 1. forEach Syntax arr.forEach(callback(element [, index [, array]])[, thisArg]); View code 2. filter Syntax var newArray = arr.filter(callback(element[, index[, array]])[, thisArg]) View code 3. map Syntax var newArray = arr.map(callback(element[, index[, array]])[, thisArg]) View code 4. find Syntax var resultElement = arr.find(callback(element[, index[, array]])[, thisArg]) View code 5. some Syntax var resultBoolean = arr.some(callback(element[, index[, array]])[, thisArg]) View code 6. every Syntax var resultBoolean = arr.every(callback(element[, index[, array]])[, thisArg]) View code 7. reduce Syntax var resultSingleValue = arr.reduce(callback(accumulator, currentValue[, index[, array]]), [, initialValue]) View code 8. sort Syntax var resultSorted = arr.sort([compareFunction]) View code