Skip to content
Just a reminder on how to use array methods
JavaScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
methods
.eslintrc
.gitignore
README.md
package.json
yarn.lock

README.md

Array Methods

A table of array methods for reference

Method What it does? Code
.filter() filter receives true/false and only puts the true ones on the array filter.js
.find() it finds the first one that returns true and returns all the array find.js
.forEach() forEach runs on each object on the array and does something with it, it doesn't return anything at all forEach.js
.map() map runs on each object on the array and returns something from it map.js
.reduce() reduce will take an accumulator first and secondly the value to accumulate reduce.js
.sort() It sorts the array depending on the arguments sort.js

Here are some examples

Method. What it does? Code
Simple Search What if you want to search for more than one argument? simpleSearch.js
Simple Billing What if you want to know how much is the billing? simpleBilling.js
You can’t perform that action at this time.