Cannot get escaping literal quotes in strings

Tell us what’s happening:
i’ve seen a bunch of people struggle with this one, and after going through so many different tips/hints etc, i still cant get it to work.

is anyone able to tell me where or how ive gone wrong?
i’ve tried copypasting the ‘correct answer’, as well as writing it down character for character for input. and it just wont work for me.
quite disheartening :frowning:

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 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

I see two problems here:

  1. You’ve added a space into one of your escape quotes.
  2. Three or your escape quotes are smart (angled) quotes instead of dumb (straight) quotes. That happens often when you cut and paste, especially into/out of a non-simple ext or code editor. In fact, it may not be a problem, but may be from cutting and pasting here.

When I fix those two things, your code passes for me.

2 Likes

Thank you!
After staring at it for so long, it now seems very obvious.
I will be sure to avoid/look for these problems with my code moving forward.

Thanks again!

1 Like

Yep get used to that feeling. It’s just part of coding. You get better at finding “dumb” mistakes, but they never go away.

1 Like