Basic JavaScript - Escape Sequences in Strings

Tell us what’s happening:
Describe your issue in detail here.
Please tell me where to input the \t in the code
myStr should contain a tab character \t which follows a newline character
Your code so far

const myStr = “FirstLine\n\SecondLine\nThirdLine”; // Change this line

const myStr = "FirstLine\n\\SecondLine\nThirdLine"; // 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/107.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Escape Sequences in Strings

Link to the challenge:

Your code is correct except that you need to account for the tab in the second line of the text. Note that the second line is indented in the challenge description.
So, you’d put the newline code at the end of the first line, then tab the second line, then add the second line text (including escaping the backslash as you have).

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