Basic JavaScript - Escape Sequences in Strings

Tell us what’s happening:

it says i can only have the characters in the chart/examples, I think I have that. should i have left it const instead of switching to var?

Your code so far

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

Challenge Information:

Basic JavaScript - Escape Sequences in Strings

Is the return required at the end of the string?

  • FirstLine should be followed by the newline character \n

  • Passed:myStr should contain a tab character \t which follows a newline character

  • Passed:SecondLine should be preceded by the backslash character \

  • Passed:There should be a newline character between SecondLine and ThirdLine

there is no \r in the instructions

Thank you! that was the issue, it passed


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