Why i can't Incrementation one argument?

Your browser information:

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

Challenge: Pass Arguments to Avoid External Dependence in a Function

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function

Hi,
This solution is very simple but what i don’t understand is why can’t implementation in this way vauer++? ( value is the parameter ).

1 Like
// the global variable
var fixedValue = 4;

// Add your code below this line
function incrementer (value) {
      return value++; // no correct 

  // Add your code above this line
}

var newValue = incrementer(fixedValue); // Should equal 5
console.log(fixedValue); // Should print 4

1 Like