Again and again)) Gettig Started with Programming 23/28


#1

Have an error, it says, "You didn't select the right substring from 'Melbourne is great'. But I guess there is a mistake in spaces in string 'Melbourne is great place'. Because the task asking count 'Melbourne', without spaces, but when I do this, comes, a mistake that I incorrectly count 'Melbourne is great'. So I'm stuck with this. And also don't know how to pass spaces( not count them).

console.log("January".substring(0,3));
console.log("Melbourne is great space".substring(0,8,10,11,13,18));
console.log("Hamburgers".substring(3,7));


#2

First what is substring() about
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/substring

= = = = = = = = = = = = = =

Instruction:
Using console.log, on three separate lines, print out the substrings for the following strings.
b. "Melbourne is" in "Melbourne is great" (note the space!)

Melbourne is great"
0123456789 1

index  Charact
Value  Value
  0         M  <== Begin Index-nr
  1         e
  2         l
  3         b
  4         o
  5         u
  6         r
  7         n
  8         e
  9         space
 10         i
 11 s
 12 <==END index-nr (is excluded)

//The definition was str.substring(indexStart[, indexEnd])
"Melbourne is great".substring(0,12)


#3

you can also contact the decipticon warship to help. i will respound and do what i can.