Please help me with this code, it didnt worked, i have been trying

Tell us what’s happening:

Your code so far

var myStr = “FirstLine
\t\SecondLine\\rThirdLine”;




**Your browser information:**

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

**Challenge:** Escape Sequences in Strings

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

Hi @ugyentenzin
I don’t think you are using the right quotes. It is supposed to be "". Secondly, the value of myStr variable should be in one line. You achieve the desired effect by using escape sequence. Check the code below. It is close to the correct solution but something is missing.

var myStr = "FirstLine\n\t\\SecondLine ThirdLine"

Thank You for the quick answer. yeah, I miss out on some and code differently.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.