We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent abea624 commit 349ba7bCopy full SHA for 349ba7b
chapters/arrays/reducing-arrays.md
@@ -24,10 +24,11 @@ You can simply use Array's `reduce()` and `reduceRight()` methods along with an
24
Or it may be something more complex such as aggregating elements from a list into a combined object.
25
26
{% highlight coffeescript %}
27
-people =
+people = [
28
{ name: 'alec', age: 10 }
29
{ name: 'bert', age: 16 }
30
{ name: 'chad', age: 17 }
31
+]
32
33
people.reduce (x, y) ->
34
x[y.name]= y.age
0 commit comments