JavaScript Lesson 25 I need your help


I have a problem

// 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.
// Use console.log to print out the first three letters of myCountry.

What is wrong here? Help!!
Thanks a lot in advance!


It's the variable you declared, you are not supposed to put quotes around the variable when you use it.


Thanks for your help! I did it!:smile:


// Déclarez une variable sur la ligne 3 appelée
// monPays et donnez lui pour valeur une chaîne de caractères.
var monPays = "La France";

// Utilisez console.log pour afficher la longueur de la variable monPays.
console.log (monPays.length);

//Utilisez console.log pour afficher les trois premières lettres de monPays.
console.log (monPays.substring (0 , 3);

peux tu me dire ce qui ne va pas dans mon code stp ?


can anyone help me with this one please. The screen to the right returns the correct value but its still wrong and i cant work out why?

var myCountry = "England";


That should return "Engl", what are you trying for? ENG? Then it would be


Since arrays work from 0 and up.