web-profile

Ramda add

Add number to every item in array:

const arr = [1,2,3,4];
const resAdd1 = R.map(R.add(1))(arr);
console.log(resAdd1); // Output: [2,3,4,5]

Leave a Reply

Your email address will not be published.