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 Comment