In number 25 in Getting Started with Programming I am not understanding what to do


#1

I am not understanding what to do. I type myCountry, as a variable, define the string to be a country (in this case America) then I define the country's length, as console.log(myCountry ===7); and then I substring it as console.log(myCountry.substring(0, 3)); and it says I did something wrong. I honestly do not know what I am doing wrong

Topic: Getting Started with Programming in JavaScript #25


#2

So you start with this...

var myCountry = "America";

As for length, that is a property that we do not define. It is already defined for the string object as a property.

console.log(myCountry.length);

You are doing the substring correctly.


#3

Thanks, it works now