Getting started lesson 25


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
lesson 25

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Oops, try again. It looks like you didn’t log the length of myCountry to the console.

```

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = “United States”;

// Use console.log to print out the length of the variable myCountry.
console.log(“myCountry”.substring(0,10));

// Use console.log to print out the first three letters of myCountry.
console.log(“myCountry”.substring(0,3));

<do not remove the three backticks above>

#2
// Use console.log to print out the length of the variable myCountry.
console.log(“myCountry”.substring(0,10));

two problems: you log a sub-string, not the length (which is a method to get the length, remember?)

you use myCountry string while you should use the variable (you want length of variable)


#3

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