Not able to figure out the question...Escape Sequences in Strings

I got it! thank you so much!

Same here, I added his code and added one backslash and it worked. Thats one thing I’ve been fighting with JavaScript since I was 21 and is that it feels like voodoo to me. I’ve decided to start again with it but the problems I had before I still have them. Most of the tutorials don’t make too much sense and jump from simple to complicated in 1 second :frowning2:

try this it will work "FirstLine\n\SecondLine\\rThirdLine

Today I face a trouble to give answer "Escape Sequences in Strings" challenge. At first I search our free code camp forum to find out the answer of this challenge. But I am failing to find the correct answer. Then I search it in google. But this time again the same case occur with me. Then I try to read the description of the challenge properly & carefully. And tried to answer it many times from my own memory. At last, I pass this challenge. Now, I am feeling so much happy. If anyone will face the same problem like me. He/She can follow this answer:

var myStr; // Change this line

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

I think, this answer can help you.

Thanks and Regards...

comment on correct solution: also works with single/double quotation marks.,
var myStr = ‘FirstLine\n\t\SecondLine\nThirdLine’;

For anyone finding a hard time to solve this challenge (and having trying every.possible.space.no.space. combination)… peel your eyes and double check that after var myStr you have a “=” and not a “;”, which is what the challenge resets to.

I had triple checked for any typos BUT that tiny detail… which changes everything (and ends the frustration). :slight_smile:

I did check out the other responses in this thread but I was looking for the wrong fix so, naturally, it didn’t help. Until you look at what’s after your var myStr.

Code away, Campers!! :sunny:

Worked for me :slight_smile:
var myStr = "FirstLine\n\t\\SecondLine\nThirdLine";