Decrement a Number with JavaScript Is this a bug?

Is this a bug? It said that "myVar = myVar - 1; should be changed" but clearly I already changed it.

Your code so far


var myVar = 11;

// Only change code below this line
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.110 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/decrement-a-number-with-javascript

Maybe you need to change it farther

You have written

myVar;
myVar--;

What’s the function of the first myVar? It doesn’t do anything

You should change it to :
var myVar = 11;

// Only change code below this line

myVar–;

Read the note :slight_smile:

The correct form is myVar--, you need two minus signs not only one