Coding errors


#1

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

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

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

This code even though it seems that I have followed the instructions exactly it wont let me pass this lesson and keeps producing an "oops" message saying I didnt :

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

This has happened also on the regular Java course i did everything correctly it seemed and it kept saying i did something wrong...i tried resetting the code, refreshing the page and it keeps giving me the same message :

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


#2

You are putting quotes around myCountry when putting it into console.log both times which is turning it into a string instead of accessing the variable named myCountry. just remove those quotes and it should work.


#3

You were right, thanks but i thought in the lessons it had quotes around those, but i guess i whatever, thanks for your help, Bijan