pushpa
#1
Tell us what’s happening:
Your code so far
var myStr = "Firstline \n Secondline \r Thirdline \\" ;//Change this line
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
.
Link to the challenge:
https://www.freecodecamp.org/challenges/escape-sequences-in-strings
There should be no spaces in myStr. Also, you are not putting the \
before and after SecondLine. Not sure why you put a \
after Thirdline.
pushpa
#3
I tried,
var myStr=“FirstLine\n \SecondLine\ \rThirdLine”;
but it is not working.
Please correct me.
pushpa
#4
I got it.
var myStr=“FirstLine\n\SecondLine\\rThirdLine”;
Thank you for your reply.