Need help


#1

Can't figure out how to get this too work. JavaScript number 25. More variable practice.

code....

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

// 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));

Keep getting an error message saying...Oops, try again. It looks like you didn't log the length of myCountry to the console.


#2

here:

console.log("myCountry".length );

you log length of "myCountry" string to console, you should log the length of the string in myCountry variable


#3

I am not grasping what you meant at all sorry. could you write right the code out.


#4

here:

var myCountry = "Northern Ireland";

myCountry is a variable, "Northern Ireland" is a string

so if we want to log a variable to console, we shouldn't use quotation mark, if you do (like you did), you will just log the string myCountry to console

if you log the variable to console, it should output Northern Ireland


#5

Hey, thanks a lot, it just couldn't see what I was doing wrong at all.


#6