Escaping Literal Quotes in Strings (Revisited)

Escaping Literal Quotes in Strings (Revisited)
0

#1

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:


#2

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).


#3

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.


#4

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?


#5

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!


#6

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