Basic JavaScript - Escape Sequences in Strings

Tell us what’s happening:
Describe your issue in detail here.
I cant figure out why this wont work. I dont know if extra steps where added since the last forum was up but the code they are using doesnt work and tick all the boxes.

Your code so far

const myStr = "FirstLine
\t\\SecondLine\\\rThirdLine"; // 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/ Safari/537.36

Challenge: Basic JavaScript - Escape Sequences in Strings

Link to the challenge:

You cannot put a line break in a string like that.

This is my code
const myStr = “FirstLine\n\t\SecondLine\r\nThirdLine”; // Change this line
and these two boxes still arent checked

  • There should be a newline character between SecondLine and ThirdLine

  • Waiting:myStr should only contain characters shown in the instructions

Why do you think you need the \r?

Also you need to escape the slash that is just before SecondLine.

I figured it out. thank you

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