Instructions: Change the code to use the ++ operator on myVar
myVar should equal 88
myVar = myVar + 1; should be changed
Use the ++ operator
Do not change code above the line
Provided Code:
var myVar = 87;
// Only change code below this line
myVar = myVar + 1;
My Code:
var myVar = 87;
// Only change code below this line
myVar = myVar++;
With this code, errors include: myVar should equal 88
myVar = myVar + 1; should be changed
I also tried myVar=myVar + 1++ in order to get myVar to = 88 first, but this also errored. Where am I going wrong on this exercise?