Challenge Name
set-default-parameters-for-your-functions has an issue.
Issue Description
I don’t really have a problem with this challenge. I’m just wondering why are there parenthesis surrounding the function that is assigned to the const increment variable. When I removed them, the test still passed.
Browser Information
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:58.0) Gecko/20100101 Firefox/58.0
.
Screenshot
Your Code
const increment = (function() {
"use strict";
return function increment(number, value) {
return number + value;
};
})();
console.log(increment(5, 2)); // returns 7
console.log(increment(5)); // returns NaN