What is wrong with this code? 25 of 28


#1

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "Hello";

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

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


#2

Don't put everything as a string. Or else, the variables will get sad. Strings are different from variables.

Instead of putting a string in "myCountry", do it like this:

console.log(myCountry.substring(0,3));

ALSO

change this:

console.log("Hello".length);

into
console.log(myCountry.length);

Hope it helped! :smiley:


#3

Thanks so much! I was getting kind of confused, but this helped alot :smile: . Sorry for responding so late.