1. // Declare a variable on line 3 called
2. // myCountry and give it a string value.
4. // Use console.log to print out the length of the variable myCountry.
6. // Use console.log to print out the first three letters of myCountry.
On line 3, you need to create a variable called
myCountry and make it a string. Something like;
var myCountry = "United States";
Then, on line 5, you need to use
console.log() to log the length of the variable you just created, using
.length, like so;
Finally, on line 7, you are asked to log the first three letters of the variable's value. This is achieved with the
.substring(x, y) method (where x is the starting index number and y is the ending), like so;
console.log(myCountry).substring(0,3); // starts at 0, which is the first letter - ends *before* 3, which is the 4th letter, resulting in letters at positions 0,1,2 being logged - the first, second and third letters.
Do you understand?