I'm confused


#1

It says i need to Use console.log to print out the first three letters of "myCountry" and you would do that like this: console.log("myCountry".substring (0,3));
But in the instructions it says that "myCountry" should have a string value
So how would you print out the first three letters with the string value?????


#2

Your problem here is that remember substring starts with index 0. So if he says print the first three letters its from 0 to 2. So

console.log("myCountry".substring (0,2));

But im not sure if im right, what lesson number is this?


#3

I'm on "More Variable Practice"
It says i need to have "myCountry" as a string value
but it also say i need to print out the fitst 3 letters.


#4

Yea forget about what i said in post 1. thing i have to add is that you have to set the variable myCountry to something. Like this:

var myCountry= "Something"

And you just print out the first three letters, plus print the length of the variable like this:

console.log(myCountry.length)
console.log(myCountry.substring(0,3))

#5

thank you it works i get it now


#6

Your problem is your determination whether to start at 1 or to start at 0
that's just a logical misconception. The only way to decide is to do more practices
.For example i finished the JavaScript courses in 5 hours ,now i'm doing all again.Overall your only hope of being a skilled coder (this refers to everyone) is to do revision

                                     REVISION