25. It looks like you didn't log the length of myCountry to the console


#1

Can you please help me.
I wrote everything out accordingly, but I keep getting this message "It looks like you didn't log the length of myCountry to the console".

Please see below for code

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "Variable"

// Use console.log to print out the length of the variable myCountry.
console.log("myCountry".lenght);

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


25/28 How to use variables
#2

console.log("myCountry".lenght);
2 problems:
-1 you are using the string "myCountry" instead of the variable myCountry
-2 you have to use the length-property and NOT lenght as you do


#3

Thank Leonhard for the input.
I made the changes and it worked I'm actually doing functions now. I'll let you know if and when hit a snag.


#4

Hi, what exactly is the length property.
I have it exactly like this:

console.log(myCountry.substring(0,11)) "number of letters for my variable"

it still gives me the same msg of not logging the length lol im so confused


#5

i got it!!! :smile:
i was just suppose to put the word length and not the actual numbers