Is it bad, that I can't see the problem?


#1

Is it bad, that I can see the problem?
Stuck at the same lesson ):

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "United States".length

// Use console.log to print out the length of the variable myCountry.
console.log("United States".length );

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


NOT A STRING var myCountry = "debopaloola"
#2

Let's start with the first task:

Do you see what you've done here:

var myCountry = "United States".length

You have assigned the length of "United States" to myCountry. The exercise is asking you to assign a string, not a number.


#3

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