Having trouble with variables


#1



https://www.codecademy.com/en/courses/getting-started-v2/4/2?curriculum_id=506324b3a7dffd00020bf661


I have no idea what to put in


// Declare a variable on line 3 called
// myCountry and give it a string value.
var "myCountry".substring(0,3);

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

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


#2

First, remove those "" on the variables.

On line 3, declare a variable for "myCountry" to any country of your choice.
Example:
var myCountry = "Mexico";

Then, you have to console.log to print the length of "myCountry".
console.log(myCountry.length);

And finally, print only the first 3 letters on "myCountry"
console.log(myCountry.substring(0,3));

Remember, coding isn't that easy.


#3

Thanks because I was having trouble with this one myself :slight_smile:


#4