Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escape Sequences in Strings challenge not accepting escape sequences #9314

Closed
nicholasengleman opened this issue Jun 23, 2016 · 37 comments
Closed

Comments

@nicholasengleman
Copy link

nicholasengleman commented Jun 23, 2016

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/53.0.2756.0 Safari/537.36 OPR/40.0.2267.0 (Edition developer).
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

var myStr = "Here is a backslash:\\.\n \t\t Here is a new line with two tabs.";

Screenshot: https://i.sli.mg/hEmocD.png

I asked for help in the chatroom and my solution was the same as others who had successfully completed the challenge.

@erictleung
Copy link
Member

@aicccia To complete this challenge, you'll need to be very precise. There should be a space before the first escape backslashes, no space between the new line character and tab, and no space between the tab and "Here".

@FreeCodeCamp/issue-moderators I recently updated the challenge and it checks for a very precise string and I think it'll be difficult and possibly confusing to ask for those specific spaces. I think a better solution would be to write a regex looking for the string and accommodate for spaces around the escape characters. Thoughts?

@erictleung erictleung added confirmed status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. labels Jun 23, 2016
@BKinahan
Copy link
Contributor

BKinahan commented Jun 23, 2016

This challenge has definitely had a spike in confusion in the HelpJavaScript chat since the change to a pair of sentences from the previous string of only escaped characters separated by spaces. This is compounded by the fact that the instructions don't display spaces clearly, and exacerbated by many new users' lack of familiarity with Gitter's code formatting syntax (which makes it difficult to detect where the error lies as \\ without formatting displays as \ and spaces can't be located/counted accurately).

Perhaps a string without any spaces or non-escaped punctuation is a better alternative, such as this or some variation:

var myStr = "First\tLine\n\"Second\tLine\"\rThird\tLine";

@raisedadead raisedadead added the help wanted Open for all. You do not need permission to work on these. label Jun 23, 2016
@einblock
Copy link

I spent quiet some time getting this one right. I kept getting the error messages:

myStr should have encoded text with the proper escape sequences and spacing.

and

myStr should not have any spaces in between consecutive escape sequences.

So, I typed and retyped the escape character sequence several times, making sure there were no spaces.
In the end, it turned out I was missing the final period, after "tabs".

I'm thinking it might be an idea to change the error messages somehow, maybe making the first one encourage that you check the entire text, not just escape sequences and spacing, and for the last one making sure it doesn't show unless the spacing is actually wrong.

@charlesBak
Copy link

the string should look like this. there is no space between the second tab and the second line.

myStr = 'Here is a backslash: \\.\n\t\tHere is a new line with two tabs';

@Marsheek
Copy link

Marsheek commented Jun 25, 2016

Just tried charlesBak solution still having no success! I've tried multiple solutions that have worked for others on the same problem and still no luck.

@charlesBak
Copy link

charlesBak commented Jun 25, 2016

sorry i forgot the mark at the end of the string.

removed solution by mod

its work fine

@Marsheek
Copy link

Thanks charlesBak!

@charlesBak
Copy link

my pleasure Marshallgray.

@wiseleo
Copy link

wiseleo commented Jun 26, 2016

This part is confusing. Although the string #9314 (comment) passes the challenge, the rendered preview has a bug.
screenshot 35

@erictleung
Copy link
Member

@BKinahan thanks for fielding through all the new confusion about this challenge. I like your suggestion on the string what should be used

var myStr = "First\tLine\n\"Second\tLine\"\rThird\tLine";

@erictleung erictleung removed the status: discussing Under discussion threads. Closed as stale after 60 days of inactivity. label Jun 26, 2016
@Chrono79
Copy link

You will also need to follow the spacing as it looks above with no additional spaces between each escape sequence.

I think it should be "...with no additional spaces after each escape sequence" instead, a lot of people leave a space between the last \t and Here

@ghost
Copy link

ghost commented Jul 2, 2016

This challenge is a bit confusing, definitely need more help on this, @freeCodeCamp please add some more content to understand it better. Thanks 😄

@ghost
Copy link

ghost commented Jul 2, 2016

@shivashinde, if you feel this challenge needs more changes, please open a new github issue.

@ajaykandari222
Copy link

ajaykandari222 commented Jul 12, 2016

removed solution by mod

this will work fine

@Chrono79
Copy link

malixi: you don't need the backslashes before FirstLine and after ThirdLine (this one is escaping the closing " btw).

@lokenpuri
Copy link

lokenpuri commented Aug 16, 2016

removed solution by mod

1 similar comment
@krishenexson
Copy link

krishenexson commented Aug 16, 2016

removed solution by mod

@krishenexson
Copy link

krishenexson commented Aug 17, 2016

I apologize

@texas2010 texas2010 removed the help wanted Open for all. You do not need permission to work on these. label Aug 26, 2016
@bjungbogati
Copy link

bjungbogati commented Sep 1, 2016

removed solution by mod.

@evan-blake
Copy link

evan-blake commented Sep 30, 2016

removed solution by mod

@jonathan-kagi
Copy link

if better instructions existed folks would not be posting here with questions. please improve

@Roachk
Copy link

Roachk commented Oct 11, 2016

This challenge can be pretty confusing with out being able to see the output. Try running this code in a interpreter online like www.codecademy.com or codepen.io. Using the interpreters you can see your output and how it looks.

image

@sumit-prgmr
Copy link

i also tried but iam only getting errors

@oforchinedu
Copy link

oforchinedu commented Nov 5, 2016

removed solution by mod

@oforchinedu
Copy link

Ok sorry I did

On Sat, Nov 5, 2016 at 2:39 PM, Lance notifications@github.com wrote:

@oforchinedu https://github.com/oforchinedu
Please do not post your solution on here. You could help people at
FreeCodeCamp Chat Room or Forum. GitHub Issues are for reporting bugs on
the website only.

Happy Coding!


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#9314 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS2vKUQlL2ZyA7gUTPJtcN0xLYw0R0Mkks5q7Ib7gaJpZM4I8gkG
.

@krishnaa208
Copy link

krishnaa208 commented Nov 6, 2016

removed solution by mod

@angelogianopulos
Copy link

Hello guys I have spent hours trying to solve this challenge without any luck can anyone help?
This is what I have

@angelogianopulos
Copy link

var myStr = '"FirstLine\n \n SecondLine \r nThirdLine/"'; // Change this line

@pksr04
Copy link

pksr04 commented Nov 9, 2016

var myStr ="FirstLine\n\SecondLine\n\rThirdLine"; // Change this line
The above code works in google chrome
js_escapecode

@wiki7
Copy link

wiki7 commented Nov 12, 2016

Solution removed by mod.

@luttenWolf
Copy link

but guys you are forgetting about the first instruction "myStr should have encoded text with the proper escape sequences and no spacing."

@symbioticon16
Copy link

symbioticon16 commented Nov 24, 2016

Solution removed by mod.

@luttenWolf
Copy link

luttenWolf commented Nov 24, 2016 via email

@choiceman
Copy link

choiceman commented Nov 24, 2016 via email

@luttenWolf
Copy link

this is still not working

@raisedadead
Copy link
Member

The issue tracker is for reporting bugs only. Please use the help chat room or try looking through the forum for help with a specific challenge.

Happy Coding.

@raisedadead
Copy link
Member

Temporarily locking conversation.

@freeCodeCamp freeCodeCamp locked and limited conversation to collaborators Nov 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests