Challenge for Functions, Scope and Closures
Challenge
The function makeAdder, takes in one parameter, x. Fill in the function body so it returns a function that takes in one parameter y and returns the sum of x and y.
For example, calling makeAdder(3); should return a function that returns 3+y, while calling makeAdder(10) should return a function that returns 10+y.
Please sign in or sign up to submit answers.
Alternatively, you can try out Learneroo before signing up.