Please Why Is This Not Working?

Tell us what’s happening:
Describe your issue in detail here. Please I need help with this coding:https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings

Your code so far


var myStr;"FirstLine
\t\\SecondLine
ThirdLine"; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36

Challenge: Escape Sequences in Strings

Link to the challenge:

First, you have to assign the string to the variable mStr. You have changed the original code by replacing the equals sign with a semicolon, which no longer assigns the string to the variable.

Second, your string should all be on the same line. You don’t literally add line breaks in the string, you use escape sequences to add the line breaks.

Give it another try and if you get stuck then post your new code.

1 Like

@bbsmooth thanks so much sir, it works…

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