From 765a27ed0dac0f23a94ecbbb5c796253d28ed985 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Sirois Date: Mon, 27 Jan 2020 02:03:24 -0500 Subject: [PATCH] content(resources): nitpick in consistency --- src/content/resources/javascript/iterative-vs-functional.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/resources/javascript/iterative-vs-functional.md b/src/content/resources/javascript/iterative-vs-functional.md index feea34c..8add5fe 100644 --- a/src/content/resources/javascript/iterative-vs-functional.md +++ b/src/content/resources/javascript/iterative-vs-functional.md @@ -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: