More Variable Practice-Can you help?


#1

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:
https://www.codecademy.com/courses/getting-started-v2/4/2?curriculum_id=506324b3a7dffd00020bf661#

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^


#2

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


#4

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


#5

You're welcome! C: Have fun!


#6

I will! Thanks again! : 3