25 help


#1

what did i do wrong

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

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

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


#2

You're asked to print out the length of the variable myCountry.

Maybe try to change your first console.log to something like this? console.log(myCountry.length); :wink:


#4

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

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

// Use console.log to print out the first three letters of myCountry.
console.log("Germany".substring(0,3));
I hope this will help you!


#5

You are learning to use variables here, so instead of:

console.log("germany".length)

You should use your variable like this:

console.log(myCountry.length)

#6

/ Declare a variable on line 3 called
// myCountry and give it a string value.
var myCountry="America".substring(0,3)

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

what did I do wrong?


#7

Putting " " on your variable name turns it into a plain old string.

You got a bit carried away there. Just myCountry="America" is what you need.