Increment a Number with help

Tell us what’s happening:

its saying I didn’t change
myVar = myVar + 1; should be changed

Your code so far


var myVar = 87;

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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36.

myVar++ is like myVar+=1; also equal myVar = ++myVar;
they want you to use myVar++;

1 Like