Skip to content

Commit 6f34587

Browse files
SunJieMingSunJieMing
authored andcommitted
Updated instructions
1 parent db3e238 commit 6f34587

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/arrays.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ const map = (elements, cb) => {
1616
// Return the new array.
1717
};
1818

19-
const reduce = (elements, cb, memo = elements.shift()) => {
19+
const reduce = (elements, cb, startingValue) => {
2020
// Combine all elements into a single value going from left to right.
2121
// Elements will be passed one by one into `cb`.
22-
// `memo` is the starting value. If `memo` is undefined then make `elements[0]` the initial value.
22+
// `startingValue` is the starting value. If `startingValue` is undefined then make `elements[0]` the initial value.
2323
};
2424

2525
const find = (elements, cb) => {

0 commit comments

Comments
 (0)