Basic JavaScript - Escape Sequences in Strings

Tell us what’s happening:
Describe your issue in detail here.

Your code so far

const myStr = "FirstLine\n\t\SecondLine\nThirdLine"; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Escape Sequences in Strings

Link to the challenge:

You need to escape the backslash, so for \ it is \\ when escaped.

[Mod edit: solution removed]

Hope this helps you!

Hey! When you’re trying to help someone please refrain from giving out entire solutions.

This could negatively impact a person’s ability to learn and can defeat the whole purpose of completing a challenge. Instead try to help them by providing useful hints and suggestions which they can use to overcome the issues they’re facing!

This will also help you in developing your problem solving and communication skills :smile:

Hey Thank you! I’m newbie but you are totally right!! I will take it into account for the next time lol

No worries and welcome to the freeCodeCamp’s community forums. Happy coding :smile:

1 Like

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