Created
February 27, 2018 08:40
-
-
Save vldvel/5de5b80ce914b009bfa6e38b30911678 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| array.reduce(param1[, param2]); | |
| // param1 - Function(accumulator, currentValue, index, array) | |
| // param2 - accumulator's initial value | |
| // EXAMPLE | |
| [1, 2, 3, 4, 5].reduce((acc, val, i) => { | |
| return acc += val; | |
| }, 0); // 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment