Escape Sequences in Strings (NOT WORKING!)

Tell us what’s happening:

Your code so far

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

I typed in the correct code and it is not letting me pass on to the next challenge

Link to the challenge:

Remember, to display an actual \, you must put another \ in front of it to escape it.

Which one should I fix?

If you want to display a \ in front of the word SecondLine, you will have to use \\ to do it.

I really don’t know how to do it

This is what I have now:

var myStr = “FirstLine\nSecondLine\rThirdLine”; // Change this line

The code you posted above produces:


The challenge wants:


Your code does not display the two \ because you are not escaping them with another \