22.substrings code academy being difficult yet again


#1

I have it correct it won't let me pass this is so irritating i want to punch the life out of someone.
Plz any one out there help me.


#2

:wonderful day".substring(3,7); I know is the answer to question 22 but it will not accept it???!! or any other possible answer (numeric value)


#3

I completed this exercise with the following code:

// Be careful with the substring's letter positions!
"wonderful day".substring(3, 7);

Hope this helps.


#4

Could one see your code to see if it is really correct or if you just assume that it is correct? Also if you think that it is about the test function you can run it in e.g. labs repl.it and see if it gives you the correct result.


#5

Remove colon : before wonderful.


#6

sure here
'wonderful day'.substirng(3,7)


#7

there is no colon so that not problem


#8

you wrote :substirng not substring :confused:


#9

This is the same code I got and It's not working.


#10

This code isn't working for me either.


#11

That is kinda strange. I went back to this course and tested it again and it works.
I'm using Chrome and Firefox and works on both browsers.

It also works without the semicolon, like this:

// Be careful with the substring's letter positions!
"wonderful day".substring(3,7)

#12

I did not figure it out but,i do know that each letter is a number so
W O N D E R F U L D A Y
1 2 3 4 5 6 7 8 9 10 11 12

so if you did "wonderful day".substring(3, 7)
the computer would print "derf"

Hope this helped :grinning:


#13

you can remove space after substring. Like this substring(3,7), not like this substring (3,7) . Hope it's useful!


#14

You will need to put (console.log) in it.


#15

Hello, if the W in wonderful is capital the debugger will not accept the text. use all lower case
'wonderful day'.substring(3,7)

not 'Wonderful day'.substring(3,7)


#16

You have not 100% correct, but you are on the right track.

In programming, numbering starts at 0. So it would look like this:

"wonderful day".substring(0, 9);

This line of code will substring "wonderful". If you did (1, 9) instead, it would print out "onderful".
If anyone needs help feel free to reply to me with a question :slightly_smiling: