freeCodeCamp: myVar++ not updating when code is changed

Challenge increment-a-number-with-javascript has an issue. User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36. Please describe how to reproduce this issue, and include links to screenshots if possible.



var myVar = 88;

// Only change code below this line
myVar = myVar++;


About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 15 (3 by maintainers)

Most upvoted comments

@khamp19 there are two things incorrect in your code. The one that others have mentioned, but also, you’ve manually changed the value of myVar to 88.

There is another bug for this challenge. I use the correct code and I can’t get it to pass with

var myVar = 87;

// Only change code below this line
myVar++;

And I had an issue with the second test

myVar = myVar + 1; should be changed

The challenge test can be found on this line and essentially has this regex test

/myVar\s*\=.*myVar\s*\+\s*1/.test(code) === false

I’m on Chrome Version 58.0.3029.81 (64-bit). I’ll leave this open for others in case it can be reproduced.