25 more variables


#1

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

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

here is my code says I forgot to log the length of mycountry?


#2

These two are not the same things:

myCountry   // is a variable currently set to  "NewZealand"
"myCountry"  // is a string containing the characters "myCountry"

Do you see the problem now?


#3

the myCountry // is a var so it shouldn't be inside "XXXXX" it must be free

try but it this way

console.log(myCountry.substring(0,3)); // without "XX"


#4

2 posts were split to a new topic: I'm having the same problem


#5

2 posts were split to a new topic: 25. I am stuck here and cant seem to move forward


#6

No myCountry is the variable, keep mycountry the variable.


#7

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