Difficulty in Escape Sequences in Strings

Difficulty in Escape Sequences in Strings
0

Tell us what’s happening:

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 6.2; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36.

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

Everything inside double quotes is already a string, and the lesson in not asking to wrap each “word” in its own double quotes.

So for example the lesson is expecting

FirstLine

But since you escape double quotes around it the output is

"FirstLine"

Which is not the same.
Hope this helps :slight_smile:

is anything wrong with the newline character I added to the code.

At a first glance the only problem I can see is the unnecessary quotes around each words.
If you are still having problem passing the lesson feel free to post the most updated version of your solution.

Thank you very much, I passed the lesson