Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:
The question wants me to produce this line in the console:

I am a “double quoted” string inside “double quotes”.


My code so far:

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


the log feedback is:

myStr = "I am a "double quoted" string inside "double quotes""


if you copy paste the example code that says you will get

Alan said, “Peter is learning JavaScript”.

Instead, you will get

myStr = “Alan said, “Peter is learning JavaScript”.”

Something is clearly not adding up here and it is very frustrating,
this is the exact same feedback the video guide user gets as well, can someone please just give me the right code or tell me something is wrong with the actual websites end, because as far as I can tell and from what the question has given me to work with I have done all there is to do to print what it wants printed.

browser information:

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

Challenge: Basic JavaScript - Escaping Literal Quotes in Strings

Link to the challenge:

We can’t write the answers for you

It looks like the required text has a period at the end.

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