Array helpers for Javascript

arr.forEach(callback(currentValue[, index[, array]]) {
// execute something
}[, thisArg]);
forEach() function
let newArray = arr.filter(callback(currentValue[, index[, array]]) {
// return element for newArray, if true
}[, thisArg]);
filter() function
arr.find(callback(element[, index[, array]])[, thisArg])
find() function
let newArray = arr.map(callback(currentValue[, index[, array]]) {
// return element for newArray, after executing something
}[, thisArg]);
map() function
arr.reduce(callback( accumulator, currentValue, [, index[, array]] )[, initialValue])
reduce() function

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store