Myvar = myvar error

Tell us what’s happening:

Your code so far

var myVar = 87;

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



Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36.

Link to the challenge:

I think the OP’s issue is he is expecting it to pass with the myVar = myVar++;. The challenge won’t pass with with either of the lines he has in his code, although both are technically correct.

The challenge is just looking for myVar++;

var myVar = 87;

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

1 Like

Question

var myVar = 87;

// Only change code below this line

myVar = myVar + 1;

Answer

var myVar = 87;

// Only change code below this line

myVar++;

already passsed test