Skip to content

Commit

Permalink
Fix a missing code tag in condense arrays waypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
SaintPeter committed Nov 5, 2015
1 parent 2ae6b77 commit 8d28da3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@
"description":[
"The array method <code>reduce</code> is used to iterate through an array and condense it into one value.",
"To use <code>reduce</code> you pass in a callback whose arguments are an accumulator (in this case, <code>previousVal</code>) and the current value (<code>currentVal</code>).",
"<code>reduce</code> has an optional second argument which can be used to set the initial value of the accumulator. If no initial value is specified it will be the first array element and currentVal will start with the second array element.",
"<code>reduce</code> has an optional second argument which can be used to set the initial value of the accumulator. If no initial value is specified it will be the first array element and <code>currentVal</code> will start with the second array element.",
"Here is an example of <code>reduce</code> being used to subtract all the values of an array:",
"<code>var singleVal = array.reduce(function(previousVal, currentVal) {</code>",
"<code>&nbsp;&nbsp;return previousVal - currentVal;</code>",
Expand Down

0 comments on commit 8d28da3

Please sign in to comment.