Escaping Literal Quotes in Strings (Revisited)

Tell us what’s happening:
I hate this so much, I need help. What am I doing wrong?

Your code so far

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

Your browser information:

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

Link to the challenge:

Make sure you are using double quotes (" straight double quotes) throughout. I see you start the string with " (straight double quotes) but then later use another kind of quote which looks like ” (curly double quotes).

I was using the straight ones before and it wasn’t working. I’ll try it again.
Thanks for the tip. I’ve literally been stuck for 2 weeks.

This is so aggravating. This is my code var myStr = “I am a “double quoted” string inside “double quotes”.”; //Change this line

It is still saying its wrong?

I got it! That final backslash, jeez killing myself for two weeks and that little error. My god, stress is real. I’m so ready to be done with Js. Thank you Randall!

You are welcome. I know JavaScript can be frustrating at times.

1 Like