Yall im confused

Tell us what’s happening:
im not sure what im supposed to be doing so i all need is an explanation then i can get ti work
Your code so far


var myStr; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 13505.111.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.152 Safari/537.36.

Challenge: Escape Sequences in Strings

Link to the challenge:

The instructions say:

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

FirstLine
    \SecondLine
ThirdLine

And it even tells you that you will need to use certain escape characters to do this. I’m assuming you know how to assign a string to a variable:

var myStr = "This is a string";

You want the string to look like the three lines of text above. Obviously you’ll want the words “FirstLine”, “SecondLine”, and “ThirdLine” in the string. The point of the challenge is to use escape characters to add the line breaks, tabs, and backslash. I’m confident you can do this.

1 Like

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