Increment a Number with JavaScript11

Tell us what’s happening:

Your code so far

var myVar = 87;

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

Your browser information:

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

Link to the challenge:

So what’s happening ? can you edit your post with more details please…

var myVar = 87;
myVar == myVar + 1 ;
this is code but i need to change increment operator ++ then i changed it showing like error
myVar ++; i did
myVar == myVar + 1; but it showing error like you should change the code
if i change it showing like answer should be 88.

Hi @subhadra,

You don’t need to do use == or = operator in this challenge. You just simply need to use the increment operator as mentioned in the challenge.

Note that myVar = myVar + 1; is exactly same as doing myVar++;

On a different note: == and = are two different operator.
== is a loose equality operator (checks value and datatype of the operands) whereas = is an assignment operator. Example: a = b, so value of b variable is assigned to variable a.