More substring practice


More substring practice

2nd line - not the correct substring... tried out all possible numbers.

console.log( "January".substring(0,3) );
console.log( "Melbourne is great".substring(0,9) );
console.log( "Hamburgers".substring(3,10) );


Hi the substring() work like that

.substring(first, end) //end isn't include

What part of the second string do you want to take?


"Melbourne" which should be (0,9), but it doesnt work :frowning: (10 wont either)


You should print
b. "Melbourne is" in "Melbourne is great" (note the space!)


damn u right, thanks