Escape Sequences in Strings -

Tell us what’s happening:
There should be a newline character between SecondLine and ThirdLine
FirstLine should be followed by the newline character \n

Above are the supposed mistakes I am making.

Could someone help with this? I feel like I did all right but still can’t pass this stage, can someone revise this stage and help me with it?

Your code so far


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


Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings

What you have now is this:

"FirstLine"
	\"SecondLine"
"ThirdLine"

You want it to look like this:

FirstLine
	\SecondLine
ThirdLine

You should remove the quotes.

1 Like

Thank you mate, the help was well received. :slightly_smiling_face: