More Variable Practice-Can you help?


I'm currently having issues wit completing this lesson(I'm not sure if I should skip it or not)

This is the link to the exercise:

The error that come up is:

Oops, try again.
It looks like you didn't log the length of myCountry to the console.

Here's my code

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "New York";
"New York".substring(0, 8);
// Use console.log to print out the length of the variable myCountry.
console.log("New York".substring(0, 8));

// Use console.log to print out the first three letters of myCountry.
console.log("New York".substring(0, 3));

Thanks everyone! ^o^


That should be console.log(myCountry.length); <-- That is how you log the length of a var, with .length.


Oh! I didn't know that! Thanks for your help! ^ ^


You're welcome! C: Have fun!


I will! Thanks again! : 3