I have managed to do the first part of the challenge but I’m struggling with the other part of the challenge can I please have some help on how to pass the other part of the challenge.
Your code so far
// the global variable
var fixedValue = 4;
function incrementer() {
// Add your code below this line
return fixedValue + 1 ;
// Add your code above this line
}
var newValue = incrementer(); // Should equal 5
console.log(fixedValue); // Should print 4
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.61 Safari/537.36
.
Challenge: Avoid Mutations and Side Effects Using Functional Programming
Link to the challenge: