nnn
August 10, 2023, 1:15pm
1
Tell us what’s happening:
Describe your issue in detail here.
i cant move from this code
Your code so far
let myVar = 87;
// 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/115.0.0.0 Safari/537.36
Challenge: Basic JavaScript - Increment a Number with JavaScript
Link to the challenge:
Suggestion:
You have the right idea. Just have the ++ and myVar reversed, I think.
Try putting the myVar first in the code.
Happy coding!
nnn
August 10, 2023, 1:47pm
4
i have tried to reverse and this is what its saying
// running tests
myVar
should equal
88
. // tests completed
Odd! Let me check it out. Because it should work if you use the same set up as you had only place the myVar before the ++ rather than ++myVar.
Like this from the lesson
Note: The entire line becomes i++;
, eliminating the need for the equal sign.
Notice the i++
system
Closed
February 9, 2024, 2:04am
8
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.