Syntax error on lesson 27 pt. 1. HELP!


There is a syntax error on JavaScript lesson 27.

My code:

var "myColor" = blue;

Please help!


myColor is a variable name so you don't need " " to create.
but blue is a srting value so you need " " there

so same for console.log.

console.log(myColor.length); //myColor is a variable name

but for blue

console.log("blue".length); //blue is a string value


The instructions specify "make it as string" yes you do need quotation marks


Thanks! I figured it out.


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