Escape Sequences in Strings Answer

Escape Sequences in Strings Answer
0.0 0

#1

Tell us what’s happening:

Your code so far


var myStr; // Change this line


Answer: 
var myStr = "FirstLine\n\t\\SecondLine\nThirdLine";

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings


#2

#3

how do we answer that?


#4

They aren’t asking you to answer literally. They are asking you to change that code to make it work properly.

Delete anything that is not javascript and just change the code where indicated to assign your string to variable myStr. When you click the “Run the Tests” button your javascript will be tested to see if your string is as required.