I am having trouble with Escaping Literal Quotes in Strings

Tell us what’s happening:
I am having trouble completing a literal quote string problem on basic JavaScript lesson. I can’t find the error that is making my tests fail.

Here are the instructions:

Use backslashes to assign a string to the myStr variable so that if you were to print it to the console, you would see:

Your code so far


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


Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/basic-javascript/escaping-literal-quotes-in-strings/

var myStr = "I am a \"double quoted\" string inside \"double quotes\".";

this is right! I can’t find any error either. After seeing your post I myself tried to complete the challenge with this code and I’m not having any trouble FCC is taking my code as the right answer. Try again it should work fine.

Thanks for the response reeju10!

It worked right as I posted this!

1 Like