25. More Variable Practice Help Please!


#1

Follow the instructions in the comments in the code to continue.

This is great and all but can someone explain this to me in a more simple way? I don't have a clue what's it's talking about and I've tried coding it several times and it's telling me I am either missing something or haven't included something, but again, I don't understand what it wants me to do. Can someone give me a better example?


#2

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

var myCountry = "__yourCountryName__";

// Use console.log to print out the length of the variable myCountry

console.log( __variableName__.length);

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

console.log( __variableName__.substring(0,3) );

I've left a couple blanks for you to practice filling in.


#5

tried this code and it wont accept it

ReferenceError: variableName is not defined

is what it says


#6

That's because it is not defined, myCountry is. That is what is meant by __variableName__, a placeholder for one of "... a couple of blanks...".