Lesson Error? Can't Move Past This Point

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?

I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make easier to read. See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

markdown_Forums

These will all do the same thing:
myVar = myVar + 1;
myVar += 1;
myVar++;

In the third case, you do not assign anything - the assignment is automatic.
HTH.