Lesson 25 - Javascript


#1

Hello everyone,

In previous forums I have noticed that I seem to be doing everything correctly, but I can't seem to get the green to move past this level. Here is what I have. Thanks for any help. :slight_smile:

// Declare a variable on line 3 called
// myCountry and give it a string value.

var myCountry = "USA";

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


#2

this two lines of code:

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

you should get the length and substring of the myCountry variable, not the string myCountry, remove the quotation marks


#3

Yay!! Thank you so much!!