What is wrong in this code?


#1

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"

console.log("january".substring(0,3));
console.log("melbourne is great".substring(0,18));
console.log("hamburgers".substring(3,10));

what is wrong in this code plz any one tell me :slight_smile:


#2

this one:

console.log("melbourne is great".substring(0,18));

seems a bit off. you only want Melbourne is, this sub-string gives more than this.


#3

bro look at the error! how many time i have changed all things but that error didnot get solved.. what should i do ???


#4

you didn't include the error message + specific exercise in the original topic?

January should have a uppercase first letter.


#5

thank you bro it solved :slight_smile: hehe simple mistake done by me !


#6