Stuck on Javascript escape sequences #147

Stuck on Javascript escape sequences #147
0

#1

I’m so stuck, and I don’t know why.

It says to do this:

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

Here is a backslash: .
Here is a new line with two tabs.
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 additional spaces between each escape sequence.

Here is the text with the escape sequences written out.

Here is a backslash: backslash.newline tab tab Here is a new line with two tabs.

Here’s what I’ve answered:

var myStr = “Here is a backslash: \. \n\t\t Here is a new line with two tabs.”;

But I keep getting these error messages:

myStr should have encoded text with the proper escape sequences and spacing.
and
myStr should not have any spaces in between consecutive escape sequences.

Thanks for your help!


Escape Sequence Javascript
#3

Thank you so much! That was very helpful :sunglasses: