Basic JavaScript - Increment a Number with JavaScript

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

let myVar = 87;

// Only change code below this line
myVar = myVar++

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Increment a Number with JavaScript

Link to the challenge:

You already assigned myVar up top. You shouldnt be trying to re assign it in the bottom line. All you need to do is increment the myVar variable

@ducnafx11736
Sometimes, when we are tired, we think we are reading, but in fact we are just waiting for our eyes to confirm our suspicion that there is nothing to see. Of course, it’s better to wait until we and our eyes are rested. And READ thoroughly…

Now you try:

  1. read everything before “i++;” and you wrestle all the information you can get our of that phrase…
  2. read everything after"i++;" and do that information wrestling again…

Note: The entire line becomes i++;, eliminating the need for the equal sign.

Hint: The stuff about becoming and letting go.

Change the code to use the ++ operator on myVar.

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