Error of undefined


#1

Hello,
I get the error: "TypeError: Cannot read property 'length' of undefined"


#2

.length should be inside console.log(), just like you did with substring, you want to get length of string stored in myCountry variable, not myCountry string


#3

#4

also already covered next problem? You create a variable on line 3, which you want to use later, to get the length and substring of. Here:

console.log("myCountry".length);

myCountry is a string, it should be the variable


#5

thanks a lot. You' re Deus ex machina.


#6