Tell us what’s happening:
Your code so far
var myVar = 87;
// Only change code below this line
myVar = 88;
myVar = myVar ++;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:62.0) Gecko/20100101 Firefox/62.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/increment-a-number-with-javascript/
This is how incrementals work:
var num= 25;
num++;// this means num= num+1 i. e. num is now 26.
First i declared num with value of 25.
Now after doing num++, my number increases by 1.
Try solving now.
Adding up to aditya_p said, what you’re written basically means myVar = myVar = myVar + 1
which can never work. Try to understand the concepts that you’re learning, break things down, it’ll make things a lot easier.