Substring question


#1

Hi, good morning,
I am having trouble with the substring: It gives me this error: " It looks like you didn't log the length of myCountry to the console."
Thank you!

var myCountry="Venezuela";
myCountry.substring(0,3);
// Use console.log to print out the length of the variable myCountry.
console.log("Venezuela".substring(0,9));

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


#2

The instructions are asking not for the actual string, but for the length of that string. We can get the length of a string by using .length.


#3

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