Last active
March 20, 2020 02:35
-
-
Save kluu1/84a7f1cdb103b8010774c2bbd2663365 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 giftCards = [5, 10, 20, 100, 20]; | |
| const total = giftCards.reduce((accumulator, currentValue) => { | |
| return accumulator + currentValue; | |
| }, 0); | |
| console.log(total); // 155 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment