I'm stuck in solving a print out using console.log for "jan in "january" string.Thanks
You pick up the first three letters of the string (starting at 0, not 1), The second param in the
substring function is excluded (so, you will be getting letters in the 0, 1 and 2 positions).
I'm agree with @arccoder77254 , you have to do know what the substring() method extracts between "start" and "end", and not including "end" itself.
console.log("january".substring(0,3)); //will return jan
Reason : index of "january" is "u" and it's not include.
I too faced with the same problem and finally solved it !!
Make sure that the 'J in January is uppercase when entered in console.log
Make sure that the 'M' in Melbourne is uppercase when entered in console.log
console.log('Melbourne is great'.substring(0,12));
Make sure that the 'H' in Hamburgers is uppercase when entered in console.log
Follow this and you will successfully complete this substring practice module..
Thank so much. Dude, I was staring at the editor for 10 minutes trying to figure out what did wrong!