25 More Variable Practice


// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "America"

// 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.

It says I didn't log the length into the console, what do I do???


These are two different things:

myCountry  // a variable currently set to "America"
"myCountry" // a string consisting of the letters myCountry

Make sure you use the one that does what you want.


Thanks so much, it worked!!


what did you change i need help also


Since you've set a value for var

myCountry --- no quotes


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.