27. I am stuck on part 27


#1

I have to same issue, I am stuck on part 27 too. It says

"Oops, try again.
It looks like 'myColor' on line 2 was not defined before it was
used. This means either you need to define it, 'myColor' is spelled
incorrectly or you need quotes around 'myColor"

And this is my code
var "myColor"
console.log(myColor.length);


Plz hlp on 27
#2

The opposite of that is true. Do not put quotes on variable names. Quotes are used to indicate strings.

When the JavaScript interpreter gets to your second line:

console.log(myColor.length);

It is seeing that you have asked it to tell you the length of the myColor variable. It is complaining because you have not yet defined a myColor variable.


#3

And how would I be able to do that?


#4

Like this:

var myColor = "some color";

#5

I am have a issue with (var"myColor".substring(0,6):wink: this can you tell me what is wrong with it

PS:I put a second () because just to show you what I am talking about it is not part of the answer


#6

var is used to declare a variable. Are you trying to declare a variable?