Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// triple the value of every item in a given array
const triple = (arr) => => 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