25 I'm stuuuck


Guys, I don't understand what I'm doing wrong. COuld someone give me a hint?

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


So at first i was going to give you a hint but ill try to explain:

  1. Your console.log(myCountry).length) need to become console.log(myCountry.length) because myCountry.length is written together.
    2.The same as number 1 your console.log(myCountry).substring(0,4); needs to become console.log(myCountry.substring(0,4) ); because myCountry.substring is written together and also the 0,4 needs to come directly after the .substring .
    Hope this helped, otherwise ill send you my full code.


For all of you that want to "compare codes" :wink:

var myCountry = "Germany";

console.log (myCountry.length);     //There you go, i deleted the comments to make id easier to read for you

console.log(myCountry.substring(0,3) );


This here

below your

Isn't necessary. What were you trying to use that for?


just noticed mb, before it wouldn't work without, editing my post. Ty


Thanks you folks!!! :slight_smile:


This topic is solved.