Lesson 25


Im not sure if the result is right could someone verify please! as the result in console log are as follows:


I thought it was supposed to count "mycountry" string and "myc" as first three letters

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


 var myCountry = "England";

This returns 7 and "Eng"

{ } <--- not necessary