I'm stuck on #25



It keeps saying:
"Oops, try again. It looks like myCountry isn't a string."

This is what I put.
// Declare a variable on line 3 called
// myCountry and give it a string value.
myCountry = 69

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



Let's start here:

myCountry = 69

69 isn't a string, it's a number. You can make it a string by putting quotes on it: "69".

Next, these two things are not the same:

myCountry   // currently is 69
"myCountry"  // is the letters: myCountry

Which do you really want the length and first three letters of?


Thank you for your help!!


I'm also stuck on 25. I can't seem to get past it keeps telling me that my syntax is off and I'm having trouble putting everything.


Hi @brandonwt123,

Please start a + new topic over here https://discuss.codecademy.com/c/javascript/getting-started-v2

Follow the template provided to create a good post.


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