How could i write "jan" in "january" in console.log?


#1

i completely don't understand it please help that how could i write "jan" in "january" in console.log??
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"


Absolutely no idea on how to work out lesson 13
#2

Hi you do it with the substring() like that

In the firts case January:
The substring count the letter from 0 to what ever the length of your word is!, so if you want to print the first three letter of January

substring(begin, end) the end isn't include 
J = 0
a = 1
n = 2

So it will be

console.log("January".substring(0,3)
 #output
Jan

Hope I could help you
Next time choose the Right Topic to make your answer.


#3

o yeah
thank you so much :slightly_smiling: