Write a function named getAdd5
that returns a new function.
This second function (let's name it add5
) should take a number as a parameter, add it with number 5 and return the result.
const add5 = getAdd5();
console.log(add5(3)); // should print "8"
const add5 = getAdd5();
console.log(add5(-11)); // should print "-6"