25. More Variable Practice


#1

I have a problem in " More Variable Practice " and it is so hard.. Can all of you give me some help.. I want to be a Web Developer and I want this job..:sob::cry::sob::cry::sob::sob::sob::cry::cry:

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

Below this line, in what way does your code behave incorrectly? " Oops, try again. It looks like 'myCountry' on line 3 was not defined before it was used. This means either you need to define it, 'myCountry' is spelled incorrectly or you need quotes around 'myCountry' ".


// Declare a variable on line 3 called
// myCountry and give it a string value.
myCountry. "Philippines"

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

to difine it use var mycountry("philippines")


#3

Similar to r242 but use

var myCountry = "Philippines";

The rest of it's looking good though! :slight_smile:


#4

error again.. " Oops, try again. it looks like you didn't log the first 3 letters of myCountry to the console. "..:sob::sob:


#5

Thanks for the help.. I got it already..


#7

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