let myVar = 11; // Only change code below this line myVar = myVar - 1;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Challenge: Decrement a Number with JavaScript
Link to the challenge:
i don’t understand it pls help
It tells you what to do but ill spell it out:
This syntax is kind of clunky: myVar = myVar - 1; So instead we can write: myVar-- Do that and you will pass the test. Note you could also write: myVar -= 1 Or to go down by two myVar -= 2
myVar = myVar - 1;
myVar--
myVar -= 1
myVar -= 2
thank you so much i can study JS easier from now on
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.