This commit is contained in:
Ilya Kantor 2017-06-19 17:21:26 +03:00
parent d67c04c22f
commit b6c7a71d0c
3 changed files with 11 additions and 13 deletions

View file

@ -517,7 +517,7 @@ Here we get a sum of array in one line:
```js run
let arr = [1, 2, 3, 4, 5]
let result = arr.reduce((sum, current) => sum + current), 0);
let result = arr.reduce((sum, current) => sum + current, 0);
alert(result); // 15
```