Set Default Parameters for Your Functions - Challenge won't test

Set Default Parameters for Your Functions - Challenge won't test
0

#1

Tell us what’s happening:
I can’t get this challenge to test for me.

I have used multiple computers, and multiple browsers.

In addition: Use the Rest Operator with Function Parameters
will not test for me as well.

Again have used multiple computers, and multiple browsers.

The challenge: Use the Spread Operator to Evaluate Arrays In-Place
worked fine for me.

Thanks for your consideration.

Your code so far


const increment = (function(number, value = 1) {
  "use strict";
  return function increment(number, value) {
    return number + value;
  };
})();
console.log(increment(5, 2)); // returns 7
console.log(increment(5)); // returns NaN

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/set-default-parameters-for-your-functions


#2

give default value in inner function too.


#3

It works if you only change the inner function. I am not sure if it works if you change the outer one, too.


#4

That worked.

Thanks a lot.