hi im trying to learn how to code but this substringing has got me stumped lol anyone got any pointers.
== the book ==
== discussions / opinions ==
This is final code:
"wonderful day".substring(3, 7);
but shouldn't the 7th letter equal the number 6 instead of 7 ??
.substring(3, 7) takes indices 3, 4, 5, and 6. It is a bit confusing!
In programming, numbers start at zero. So in substring, say you want to cut out "Goo" in "Google":
Take a look here if you want to learn more: http://www.w3schools.com/jsref/jsref_substring.asp
If you have any other questions, feel free to reply.
Probably used an hour trying to figure out why my code didnt work. Had an uppercase "W" in wonderful
I still don't get it. My code
console.log("Melbourne is great").substring(0,11));
You can't use
.substring() on a function like
Read earlier posts, and figure out your problem.