Escape Sequences in Strings....How can the code be written here?

Escape Sequences in Strings....How can the code be written here?
0

#1

Tell us what’s happening:

Your code so far


var myStr=“FirstLine\n\SecondLine\\tThirdLine”;

 // 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/68.0.3440.106 Safari/537.36.

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


#2

they have asked for:

FirstLine
\SecondLine
ThirdLine

Here is the text with the escape sequences written out.
FirstLinenewlinetabbackslashSecondLinenewlineThirdLine

and you have so far

var myStr=“FirstLine\n\SecondLine\\tThirdLine”;

So you have FirstLine
and you have newline, so far so good
next comes the tab character, you are missing that…
after that comes the backslash, you don’t have that
etc.

So just follow the given instructions carefully and make sure you have each relevant character listed.