Escape Sequence in Strings

Good day,

Can someone tell me how to do this one? i honestly don’t even know where to start

Thanks in advance

Your code so far


var myStr; // 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/69.0.3497.100 Safari/537.36.

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

What part of the instructions do you not understand?

In the challenge instructions you can find the string you should replicate, and it gives you the next step: the ‘translation’ in pseudo code:

FirstLine newline tab backslash SecondLine newline ThirdLine

Now, check the provided table: How can i write a new line with escape sequence? Replace the characters in the table with the corresponding pseudocode and go for the next ^^
Below a blurred example of the first escape sequence replaced:

var myStr ="FirstLine\n`tab` `backslash` SecondLine `newline` ThirdLine";

Thanks will give that a try !

1 Like