Basic JavaScript - Escaping Literal Quotes in Strings

Hello, everyone! Can’t understand what the mistake is but I can’t get through this task! Would you help me, please

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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36 Edg/107.0.1418.56

Challenge: Basic JavaScript - Escaping Literal Quotes in Strings

Link to the challenge:

i think the original line was a const not a var.
Try returning it back to const.

Edit: actually, when I copy your code, it doesn’t work even if I change the var to a const.
But when I copy the text from the exercise and put the exact same backslashes, it works.
I think you may have an encoding problem.
Can you make sure to use a English United States language setting on your computer to type the characters?

Hi! Thank you so much for your help! I followed your advice and copied the sentence from the text and it worked out! The problem is connected with the font as you said)

1 Like

The problem was that quotes was spelled wrong, as qoutes.


good catch! I see that now.

indeed!) doing tasks late at night is not a good decision))

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.