Can someone point out where I’m going wrong and advise me what I need to do to solve 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: