Answers for "compose es6"

1

compose es6

//It is also called as nested function in ecmascript
const compose =(f,g) => (a) => f(g(a));
const sum = (num) => num + 1;
compose(sum,sum)(5)
//Answer is 7
Posted by: Guest on May-23-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language