23 "More Sub Strings"


Hey Folks hope you are doing well on your various things here is my problem.

Objective is:
Using console.log, on three separate lines, print out the substrings for the following strings.

a. "Jan" in "January"
b. "Melbourne is" in "Melbourne is great" (note the space!)
c. "burgers" in "Hamburgers"

What I believe to be correct.

console.log("Melbourne is Great".substring(0,10));

I would love the answer but most imprtantly I want to understand the flaw in my thinking.

Thanks In Advance :smiley:


"Melbourne is Great".substring(0,10)

Why 10? "Melbourne" has only nine letters, right?

I had misread instructions, @mtf is right :slight_smile:


Melbourne is has twelve letters.