Basic JavaScript - Increment a Number with JavaScript

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

let myVar = 87;
myVar = 87;
myVar++;
// Only change code below this line
myVar = myVar + 1;
let myVar
Your code so far

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

Your browser information:

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

Challenge: Basic JavaScript - Increment a Number with JavaScript

Link to the challenge:

First of all, please ask a question. Part of being a coder is talking about code and explaining problems. If you’re on a job and you just send code to other developers broken code with no explanation, they aren’t going to like that. Asking for help is a good thing, but doing it that way … you’re going to go out to find your tires slashed a lot. :wink:

SyntaxError: unknown: Identifier 'myVar' has already been declared. (6:4)

  4 | // Only change code below this line
  5 | myVar = myVar + 1;
> 6 | let myVar 
    |     ^

This is telling you, “Hey, wait, you already declared a variable with that name. This must be a mistake.”

You can only declare a variable once, whether it is declared with let, const, var, a parameter list, etc. Two variables in the same scope cannot have the same name so if a variable already exists from that scope, you cannot declare a new one. And there is no need; myVar already exists.