Functional Programming: Avoid Mutations and Side Effects Using Functional Programming

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:

Hey @OwainBennett,

You don’t need to create a variable here:

The challenge clearly asks you to only change to code inside the comments, but you tinkered with the rest of the code causing it to fail. It’s fine to console.log(); outside the comments, but don’t put anything outside the comments if not said so, because there is probably an important part of the code that checks for specific parts.

Thank you solved the problem now thank you