Escape Sequences in Strings - help needed!

What am I doing wrong? I can’t seem to pass this challenge and I don’t know where I’m going wrong :frowning:

This is what I’m trying to get:

FirstLine
\SecondLine
ThirdLine

Any help appreciated! Thanks!

Your code so far


var myStr;FirstLine\n\t\\\SecondLine\nThirdLine; // Change this line




Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

Link to the challenge:

  1. should be and ‘=’ sign instead of a ‘;’ after “var myStr”.
  2. strings should be in quotes " " so every thing after the ‘=’ sign should be in quote except the ending semicolon e.g “this is a string \n”;
  3. the ‘\’ after the ‘\t’ should also be a ‘\t’ so ‘\n\t\t\’
2 Likes

Thank you so much for taking the time to reply! Soooo obvious now. I need to pay attention to the details.

1 Like