25. More Variable Practice

Does anyone know what i am doing wrong? I have went back into other lessons and have searched my but off trying to figure out the problem! Please help!

Try to use the variable myCountry instead of the string “myCountry” like this:

console.log(myCountry.length);

and this:

myCountry.substring(0,3);

okay , check it out!

Print the letters using console.log on line 9

This is what it should look like:
// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = “USA”;
“USA”.substring(0,3)
// Use console.log to print out the length of the variable myCountry.
console.log(“USA”.length );

// Use console.log to print out the first three letters of myCountry.
console.log(“USA” );

This is just а hack - you are not properly fulfilled any of the instructions.

You are not using the variable myCountry at all. And you are printing out all letters instead of the first three.

The program is a tad literal so unless you put USA in it will not take your answer. Your answer should look like this:

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