I Don't Understand How This is Wrong


#1



I don't understand why this is wrong. I've checked the forums for a solution and I refreshed the page, but it still says, "SyntaxError: Unterminated template literal"


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

// 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

Your code is fine. Just refresh or change browsers. :slight_smile:
Though you're missing a semi colon,

that doesn't stop your code from working in the lesson.


#3

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "West"
// 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));

#4

your code is right for the exercise :slight_smile:


#5

is that backtick in your code?


#6

I must have put it there by accident. That's what was wrong. Thanks for the help!


#7

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