I can't seem to get past this challenge and it's driving me nuts. I thought I followed the instructions correctly. Can someone please figure out what the error is? (I have a feeling it's something stupidly simple.)
The challenge is here: https://www.freecodecamp.com/challenges/escape-sequences-in-strings, below is my code.
var myStr =
FirstLine\n
\\SecondLine\\
\rThirdLine;
Thanks in advance!
Edit: 1st line error: unexpected '\' and missing semicolon; 2nd line error: unexpected '\'; 3rd line error: unexpected '\'
In order to make the challenge work, you're going to need your whole string in quotes and on one line.
So change
var myStr =
FirstLine\n
\\SecondLine\\
\rThirdLine;
to
var myStr = "FirstLine\n\\SecondLine\\\rThirdLine";