Basic JavaScript - Increment a Number with JavaScript

I don’t seem to understand what’s going on here… Please help. I have tried but still not passing the test. Please I need an explanation to this…

Your code so far

let myVar = 87;

// Only change code below this line
myVar = 87 + 1;

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 12; CPH2387) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36

Challenge: Basic JavaScript - Increment a Number with JavaScript

Link to the challenge:

The lesson wants you to use the ++ operator.

take a close look at the example they gave you in the lesson

i++;

is the equivalent of

i = i + 1;

you need to apply the same concept to the myVar variable here

hope that helps

Still not getting it. I need a full detailed explanation. Sorry for stressing you

Thanks so much… I just figure it out.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.