Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:

I can’t find where is the mistake.

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

"double quotes"."; // Change this line

const 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36

Challenge Information:

Basic JavaScript - Escaping Literal Quotes in Strings

hi apparently its a SyntaxError, your string on the 1st line is not enclosed by double quote properly. Hence, " string inside" is getting syntax error. Just move your 2nd line to the 1st line will do, hope this helps.

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