Lesson 25


#1


I am on lesson 25 and I cant seem to get passed it. Can anyone help me out?


var myCountry="United States";
United States.substring(0,13);
// 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) );


#2

myCountry is a variable
"myCountry" is a string

The exercise is asking you to print out the length of the variable myCountry.

Do you see the problem now?


#3

Really not sure what I'm doing wrong here. Please help!

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

var myCountry ="USA";
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(myCountry.substring(0,3));


#4

Sorry guys, figured it out. Feel dumb now haha


#5

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