Ramda reduce

Add all items in the array:

const arr = [1,2,3,4,5];
const resAcum = R.reduce(R.add, 0)(arr);
console.log(resAcum); // Output: 15

Leave a Reply

Your email address will not be published. Required fields are marked *