Skip to content

Commit 349ba7b

Browse files
committed
Add square array brackets
1 parent abea624 commit 349ba7b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

chapters/arrays/reducing-arrays.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,11 @@ You can simply use Array's `reduce()` and `reduceRight()` methods along with an
2424
Or it may be something more complex such as aggregating elements from a list into a combined object.
2525

2626
{% highlight coffeescript %}
27-
people =
27+
people = [
2828
{ name: 'alec', age: 10 }
2929
{ name: 'bert', age: 16 }
3030
{ name: 'chad', age: 17 }
31+
]
3132

3233
people.reduce (x, y) ->
3334
x[y.name]= y.age

0 commit comments

Comments
 (0)