mcne65
October 14, 2017, 7:24am
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
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.
mcne65
October 14, 2017, 10:53am
3
None of the answers worked for me!
As the failing test states, you have to "Use the --
operator on myVar
".
mcne65
October 14, 2017, 11:15am
5
Not sure what happened but this is correct answer below:
myVar = --myVar;
I have the same issue, in several tests