Tell us what’s happening:
So I know my answer is very wrong but im just so confused Im not getting this can someone break down everything in laymens terms please thank you!
Your code so far
var myStr = FirstLine\n\t\SecondLine\n\tThirdLine;
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings
First of all, you need to wrap your string in quotes.
\n
and \t
are special characters, where the first one starts a new line, and the second one inserts horizontal tab. So when for example you write your string in the console it would look like something like this:
FirstLine
SecondLine
ThirdLine
so where do I put the \t at
Tell us what’s happening:
Im not sure where I put the \t at
can someone explain to me where and why.
Your code so far
var myStr = "FirstLine\nSecondLine\nThirdLine";
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escape-sequences-in-strings