Decrement a Number with JavaScript Help!

Decrement a Number with JavaScript Help!
0

#1

Tell us what’s happening:

Your code so far

var myVar = 11;

// Only change code below this line
i-- = i--;

Correct answer below:
myVar = --myVar;

Link to the challenge:
https://www.freecodecamp.org/challenges/decrement-a-number-with-javascript


#2

As stated: i-- is equivalent to i = i -1. Now for the challenge you will have to decrement myVar. One way would be: myVar = myVar -1, but they want you to use the -- operator.


#3

None of the answers worked for me! :frowning:



#4

As the failing test states, you have to "Use the -- operator on myVar".


#5

Not sure what happened but this is correct answer below:
myVar = --myVar;


#6

I have the same issue, in several tests