Having trouble passing Escaping Literal Quotes in Strings

Can somebody please point out the error in my code?

var myStr = "I am a \"double quoted\" string inside \"double quotes\"."; // Change this line

Otherwise this is a bug. You can see how I have worked through the problem in detail here.

Can you tell us which tests you are failing with the above code? I pass both tests when using what you have provided? What browser and operating system are you using?

Safari 11.1.2/ macOS High Sierra 10.13.6.
I’ve detailed it here.

Safari does not work well with FCC as it lacks many of the features modern browsers such as Chrome or Firefox have. FCC’s challenge tester makes use of such features and can lead to tests not working as intended. We recommend the latest version when working on the FCC curriculum for the best experience.

Thank you for this response. Honestly, I do not understand what you are saying even as I hear you clearly. Safari runs on a gazillion iPhones from the same code base and this very much sounds like the bad old days of “works best with IE”. I’m old enough to remember that. The browser is up to date as of 2018 and if features really must be so bleeding-edge, perhaps you should dial back a bit.

Again, we highly recommend using the latest version of Chrome or Firefox to have the most reliable experience with the curriculum.

Safari is not widely used outside of Apple products. In fact, they stopped making a Windows browser quite a while back. Safari lacks many features that Chrome and Firefox have and have broad support across both Windows, Linux, and Apple products.

Listen, I literally love you and what you do. It is revolutionary. I am also saying that this looks awful. Safari is a major browser. What happened to the principles of “graceful degradation” or are we all just eventually going swap over to Chrome/ Blink and become a web monoculture? Microsoft did it, after all. It’s really poor design to tell me to move over to Chrome. I will do it, but what you are telling me blows.

If you look in Safari’s console, what errors (if any do you see)? A screenshot would be great. I can not promise anything, but there are any errors showing, I can attempt to research and see if there is a way to “fix” the code base to work with the latest version of Safari for at least this challenge.

Also, can you take a screenshot that shows the code you have written which you think should pass and which also shows the tests which do not pass? Based on the error message I am seeing above, I need to check for something else in your code.

EDIT: Before clicking Run the Tests, make sure to clear the console messages and post back another reply with a screenshot of your console again. I need to understand if the console messages are from multiple clicks of the Run the Tests button or just one click.


  1. I’ve cleared the console and run the test

  1. Detailed which test should pass, and highlighted the code

  1. Showed I am running the latest build of Safari, version 13, version 6 (7?) beta


Can you try removing the commented section out? The tests might not be ignoring the comment code and thinks there is a problem.

When I remove the commented section, the test succeeds.

Do you care to explain what you think is happening? It’s useful to those of us who want to understand code and the browser on a deeper level than just getting the certification. Also: I am learning a lot by catching the bugs. It forces me to write alternative code to prove what think are mistakes instead of just firing up Chrome.

as it is checking how many backslashes are used, the tests are probably checking the content of the editor. doing this there is no distinction between comments and normal code

Do you have any clues as to the technical reasons Chrome and Safari behave differently?

freecodecamp uses newer technologies that do not yet work on Safari or Edge

I think that’s essentially the same thing as “Google technologies” - so, singular as opposed to newer - and that is bad for the web. The shape of it shouldn’t be determined by an advertising company. Appears to be exactly the same situation back when IE was king and M$ was doing all kinds of proprietary stuff that didn’t work in other browsers. Chrome tracks me/ allows tracking, and tracking is malware. I’m never going to use it again, and users should not be forced to. It’s a very poor decision by freeCodeCamp. Privacy is also a performance issue. From this article:

“Blocking cookies is bad for privacy. That’s the new disingenuous argument from Google, trying to justify why Chrome is so far behind Safari and Firefox in offering privacy protections.”

if you want to bring the issue to the development team you can open a GitHub Issues.

1 Like