Skip to content

Commit

Permalink
Fix: typo
Browse files Browse the repository at this point in the history
`total += number` => `total + number`
  • Loading branch information
ysm-dev authored Feb 13, 2018
1 parent b56cd8d commit 84b6aea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1553,7 +1553,7 @@ More declarative using `.reduce(reducerFn)`:

```js
const sumOfNumbers = numbers =>
numbers.reduce((total, number) => (total += number), 0);
numbers.reduce((total, number) => (total + number), 0);
sumOfNumbers(numbers); // 15
```

Expand Down

0 comments on commit 84b6aea

Please sign in to comment.