Escape Sequences in Strings?

Tell us what’s happening:
what is wrong with this??? i think it is fine

Your code so far

var myStr="FirstLine\n\SecondLine\\rThirdLine"; // Change this line

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36.

Link to the challenge:

It is the backslash - you’re missing some. Each escape sequence starts with backslash. You have to insert four so you need at least four backslashes that will not appear in your string.

Read the instructions about how to insert a backslash into string with an escape sequence.

(Because the backslash is itself the indicator of an escape sequence you have to handle backslash as an escape sequence.)

In below line you are to replace with the indicated escape sequence.

FirstLinenewline backslash SecondLinebackslash carriage-returnThirdLine

Good luck!

1 Like