Basic JavaScript - Escape Sequences in Strings

Tell us what’s happening:
how do we know what code to use in he sentence like,,
Like how do we know whne to \n or \ ?
i am confused in that part plss i need this quick
Your code so far

const myStr = "FirstLine\n\t\\SecondLine\nThirdLine"; // 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/114.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Escape Sequences in Strings

Link to the challenge:

As the instructions state:

\n newline
\t tab

A new line is like pressing enter and a tab is like pressing the tab key- it puts 4 spaces at the front of a line.

1 Like

thank you again
dsfko;gji;flksJSP oifguopisdjoiszgdioa’of;ag

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