Show Buttons
Share On Facebook
Share On Twitter
Share On Google Plus
Share On Linkdin
Share On Reddit
Contact us
Hide Buttons

Function which returns a function javascript


Problem

Implement the compound function which returns a function and satisfies the following condition

function add10 (a) {
  return a + 10
}

console.log(add10(10)) // 20
console.log(compound(add10)(10)) // 30

Solution


You may also like...

Leave a Reply

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