Freecodecamp: Escape Sequences in Strings challenge not accepting escape sequences

Created on 21 Mar 2017  路  8Comments  路  Source: freeCodeCamp/freeCodeCamp

Challenge Escape Sequences in Strings has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myStr= "FirstLine\n\\\"SecondLine\"\\\rThirdLine"; 
// Change this line



untitled
my code doesn't have any space but it's still error, somebody please explain to me !!!

All 8 comments

@baotrum The challenge didn't ask you to put (escape) double quotes ( \") around SecondLine.

This is not a bug, and Github issues are for reporting bugs.

If you need help with a challenge, you should ask in one of the help rooms first.

Thank you.

i'm try ask at help rooms but not reply, i'm try new code but it's still wrong at: myStr should have encoded text with the proper escape sequences and no spacing.
my code
var myStr = "Thisis\n\\thefirst\\\rsentence.";

@baotrum sorry about the misunderstanding. Sometimes no one knows the answer or the other campers are busy helping other campers. Next time try to ask the question again at another time.

Now about your solution, the text you were using in the screenshot above was correct (so, you don't have to change the text, just remove the extra code). The error was only that you were using the escape code for double quotes when you're not asked to.

removed solution by mod

note:Note that the backslash itself must be escaped in order to display as a backslash.(this point helped me to get solution for this.

This one worked perfectly fine for me!
removed solution by mod

@texas2010 Roger that! I apologize! :D If anyone's still having problem with this task and needs help PM me ;)

@lisa13 no problem.

image

It doesn't work - this is bugged.

Was this page helpful?
0 / 5 - 0 ratings