skip navigation

There is so much this week my brain got so big.

Array Methods

The find() method for an array. Returns the first result of the search, but it returns truthy or falsy.

The filter() method allows you to filter using a specified function. Think this one filters all results

the forEach() method runs a function for each item in the array.

Loooooops

For...of loop

Runs through an array returning the value of an array. Kinda. For example:


for (let book of books) {
  run code;
} 

For...in loop

Runs through an array returning the index of the array object. Kinda. For example:


for (let book in books) {
  run code;
}