Merge pull request #219 from the-programmers-hangout/content-resources-nitpick

content(resources): nitpick in consistency
This commit is contained in:
Jean-Philippe Sirois
2020-01-27 17:03:44 -05:00
committed by GitHub
@@ -84,7 +84,7 @@ users.forEach(user => {
console.log(youngerUsers); // outputs [ { name: "John", age: 17 }, { name: "Jane", age: 16 } ]
```
## Modifying all elements of an array using `.map()`
## Modifying all elements of an array using `map()`
It's common to want to modify every element of an array with some logic, and `map()` makes this easy.
@@ -116,7 +116,7 @@ users.forEach(user => {
console.log(userNames); // outputs [ "Joe", "John", "Jane" ]
```
## Running custom logic using an array using `.reduce()`
## Running custom logic using an array using `reduce()`
`reduce()` is often less understood, but it's not that complicated once you get the basics. Itself, it takes 2 arguments, a function, and an initial value. The function takes a few arguments: