Need some Help! Java Script : Getting Started with Programming / Lesson25


Oops, try again. It looks like you didn't log the length of myCountry to the console.

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

// Use console.log to print out the length of the variable myCountry.
console.log( );

// Use console.log to print out the first three letters of myCountry.
console.log( myCountry.substring(0,3) );


Back in the exercise called Discover the Length, we learned how to log the length of a string to the console.

As we did in that exercise, in this exercise you will also need to use .length -- the difference here is that you are logging the variable myCountry instead of a string.

Can you see what you need to do now?


this part is still empty, I suppose you missed this.
you should print out the length of myCountry


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