23.Substring bug? i need help


// Use console.log( ) to print out the substrings.
// Here is an example of the 1st to 4th letter of "JavaScript":
// console.log("JavaScript".substring(0,4));

console.log("Melbourne is great".substring(0,12));


I'm not sure what problem it is that you're having here, but one thing to remember about how string.substring(start, end) works is that the 'start' value is inclusive, and the 'end' value is non-inclusive. In addition, the index always starts at 0.

"abcde".substring(1,5) will result in "bcde".

"abcde".substring(0,4) will result in "abcd"


your numbers might be too long. Remember that the first letter is 0 and not 1


am having the same issue. how did you solve the problem


the code that worked for me had:
console.log("Hamburgers".substring(3, 10));

hope that helped.