Help i cant get through this task

Tell us what’s happening:

hello, i

Your code so faram doing exactly as the video has shown me but it seems not to go through.


var myName = "beau"

Your browser information:

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

Challenge: Declare JavaScript Variables

Link to the challenge:

We tell JavaScript to create or declare a variable by putting the keyword var in front of it, like so:

var ourName;

creates a variable called ourName .

You need to declare but not initialize the variable.

1 Like

Hello~!

Look at the challenge instructions closely:
“You should declare myName with the var keyword, ending with a semicolon”

1 Like

You didn’t finish it with a semicolon ;

To build further on @JeremyLT’s comment:
var myVar = 1000;
This line does two things:

  • First it declares the variable myVar: var myVar.
  • Second it initialises the variable with a value of 1000: = 1000
  • Third it indicates the end of an expression with ;
1 Like