Stuck on #25 can not find the issue


#1

https://www.codecademy.com/courses/getting-started-v2/4/2?curriculum_id=506324b3a7dffd00020bf661#

Its saying I haven't logged the length of myCountry in the console, also it appears to have not logged the variable correctly because it is giving me the lenght for myCountry (not the variables length)


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

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

Is there a difference between a variable and a string?


#3

I shouldn't have the quotes around the variable after its been defined, ahha! thank you!


#4

i didn't understand it
can u plz explain why this again


#5

The name of a variable and what it refers to are different values


#6

can u plz write the right code & give it to me
i m not able get what u r telling


#7

If a variable is named password, and it refers to a string with length 100

var password = 'O{9MGf~}+*2MRk7^=bJn,1}]O(h#lju~s[HyyR{8E#JgQ%;(b4H%q^7AH5rkJ/*=$lCMq(q+U@64ZG>B_!sl[JD?Q.LulyIM7c$I';

then getting the length of password should return 100, not 8 which is the length of "password"


#9

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