Created
January 12, 2022 02:30
-
-
Save ancyrweb/1ac7d5b122666dd5eee32d767e643a98 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
const elements = [1, 2, 3, 4, 5]; | |
const sum = (a, b) => a + b; | |
const nextElements = elements.reduce(sum, 0); // 15 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment