Lesson 25 Help Please


#1

I can't work out where I'm going wrong? If anyone could advise me on where my code has gone wrong then help would be much appreciated! cheers!

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = scotland
"scotland".substring(0.8);

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

cracked it, all good :smile:


#3

What did you do to make it work?


#4

// Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry = "South Africa"
"South Africa".substring(0.12);

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

make sure your country starts with a capital letter
e.g. "south africa" is not the same as "South Africa"
dont for get to put "" around your country name