Lesson 25 struck up. pl help


#1

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

<do not remove the three backticks above>

#2

If it is exercise
https://www.codecademy.com/en/courses/getting-started-v2/4/2?curriculum_id=506324b3a7dffd00020bf661
please give the full code you are using ???

Maybe for a better understanding you could read
=the Book=
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring


#3

Hi, I’m having great trouble with Lesson 25 as well.

// Declare a variable on line 3 called
// myCountry and give it a string value
var myCountry = “myCountry”.substring(0,9);console.log(“myCountry”.substring(0,9));
// Use console.log to print out the length of the variable myCountry.
console.log(“myCountry”.substring = (0,9));
// Use console.log to print out the first three letters of myCountry.
console.log(“myCountry”.substring = (0,3
));

It says I did not log the first 3 letters to the console? But I thought the last line indicated that? Help please!! thank you!!!


#4

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

It looks like you didn’t log the first 3 letters of myCountry to the console.

// Declare a variable on line 3 called
// myCountry and give it a string value
var myCountry = “myCountry”.substring(0,9);console.log(“myCountry”.substring(0,9));
// Use console.log to print out the length of the variable myCountry.
console.log(“myCountry”.substring = (0,9));
// Use console.log to print out the first three letters of myCountry.
console.log(“myCountry”.substring = (0,3));


#5

// Declare a variable on line 3 called
// myCountry and give it a string value
var myCountry = “Zimbaland”;
//You have defined a VARIABLE myCountry with an associated string-Value “Zimbaland”
//From now on
//if you use myCountry in your code,
// the Javascript interpreter will evaluate that to the string “Zimbaland”

// Use console.log to print out the length of the variable myCountry.
// now read https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/length
console.log(myCountry…);

// Use console.log to print out the first three letters of myCountry.
// now read https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring
console.log(myCountry.substring(…,…));


#6

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