Escape Sequences in Strings - Help Please

What am I doing wrong here?

Assign the following three lines of text into the single variable myStr using escape sequences.


You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.

Here is the text with the escape sequences written out.

FirstLine newline tab backslash SecondLine newline ThirdLine

var myStr; "FirstLine\n\t\\SecondLine\nThirdLine";

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; rv:63.0) Gecko/20100101 Firefox/63.0.

Link to the challenge:

The \SecondLine is tabbed, but doesn’t show on the post.


The formatting makes it hard to tell, but are you actually assigning the string to myStr. (forum code formatting)

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make easier to read.

See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.

Note: Backticks are not single quotes.


var myStr; "FirstLine\n\t\\SecondLine\nThirdLine"

See again the Storing Values with the Assignment Operator challenge and the Initializing Variables with the Assignment Operator challenge