25 More varaiable practice


#1

Can someone help me with my code here if possible?

Best

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

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

Very simple error but I almost missed it haha!

You see (myCountry). ?

You have a parentheses after that which shouldn't be there. It should look more like (myCountry. whatever goes here
and another small error being the 0.3 should be a comma.

Worked like a charm after that!


#3

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