This forum is now read-only. Please use our new forums! Go to forums
25/28 I'm confused but I really want to understand this
// Declare a variable on line 3 called // myCountry and give it a string value. var myCountry = “USA”
// 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.substrings(0,3));
What am I doing wrong?
Answer 544d2e5352f863a8b400052f
I did it like this and got answer var myCountry=”Kilkirk”
// 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));
Answer 544f755252f863425500190f
I got it! // Declare a variable on line 3 called // myCountry and give it a string value. var myCountry =”USA”;
// 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));
bottom line i was saying USA when it says print out the first three letters of myCountry…..i was dumb haha. Also I forgot the ; after the first two lines
1 comments
Glad you got there in the end.
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
6 comments
maybe the ; is the difference.
also you said substings instead of substring, singular
/\ /\ /\
instead of my country in the last line put USA
@mr_runner_2626 Absolutely not correct!!!!
then what is @neil