Don't understand why my syntax is wrong? lesson 25 more variable practice


#1

here's my code:

var myCountry = "England";
console.log(var myCountry === "England".length);
console.log(var "England".substring(0,3));

it says that there's a syntax error and i don't understand why?


#2

stating "var" is initializing a variable, and you cannot initialize variables inside of console.log statements.

Change:

console.log(var myCountry === "England".length);
console.log(var "England".substring(0,3));

To:

console.log(myCountry === "England".length);
console.log("England".substring(0,3));