Variable error repeat

what am i doing wrong?:

Your code so far


var myname = "sue"; 

Your browser information:

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

Challenge: Declare JavaScript Variables

Link to the challenge:

1 Like
var myShoeSize;
var myshoesize;

These are not the same. There is an error in your code… having to do with upper vs lower case. :wink:

thankyou but i changed it and it still didn’t workerror var

1 Like

So declaring a variable and assigning a value are two separate steps. We often see them combined, but:

var myAge = 50;

// the above is a shorthand for
var myAge;      //declaring the variable
myAge = 50;     // and assigning a value

In the current assignment, you are only declaring the variable, not assigning a value. Remove the = "sue" and it’ll pass.