Skip to content

Commit

Permalink
add note for exercise 16 to avoid common confusion
Browse files Browse the repository at this point in the history
  • Loading branch information
qbig committed Dec 22, 2015
1 parent 4d53688 commit a30687f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@
</div>
<h1 class="center">Functional Programming in Javascript</h1>

<p>This is a series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript.
So why is the title "Functional Programming in Javascript"? Well it turns out that the key to learning Rx is
training yourself to use functional programming to manipulate collections. Functional programming provides
developers with the tools to abstract common collection operations into reusable, composable building blocks.
<p>This is a series of interactive exercises for learning Microsoft's Reactive Extensions (Rx) Library for Javascript.
So why is the title "Functional Programming in Javascript"? Well it turns out that the key to learning Rx is
training yourself to use functional programming to manipulate collections. Functional programming provides
developers with the tools to abstract common collection operations into reusable, composable building blocks.
You'll be surprised to learn that most of the operations you perform on collections can be accomplished with
<b>five simple functions</b> (some native to JavaScript and some included in the
<b>five simple functions</b> (some native to JavaScript and some included in the
<a href="https://github.com/Reactive-Extensions/RxJS">RxJS library</a>):
</p>
<ol>
Expand Down Expand Up @@ -1877,7 +1877,7 @@ <h4>Exercise 15: Use forEach to find the largest box art</h4>
<div class="lesson">
<h4>Exercise 16: Implement reduce()</h4>

<p>Let's add a reduce() function to the Array type. Like map</p>
<p>Let's add a reduce() function to the Array type. Like map. Take note this is <b>different from the reduce in ES5</b>, which returns an value instead of an Array! </p>
<textarea class="code" rows="40" cols="80">
// [1,2,3].reduce(function(accumulatedValue, currentValue) { return accumulatedValue + currentValue; }); === [6];
// [1,2,3].reduce(function(accumulatedValue, currentValue) { return accumulatedValue + currentValue; }, 10); === [16];
Expand Down

0 comments on commit a30687f

Please sign in to comment.