Last active
April 11, 2018 09:41
-
-
Save Arieg419/bb66e8f28735aebae075ea4705a9957f 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
// triple the value of every item in a given array | |
const triple = (arr) => arr.map((currentItem) => currentItem * 3) | |
// sum all the elements in a given array | |
const sum = (arr) => arr.reduce((prev, current) => prev + current, 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment