Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:
Describe your issue in detail here.
It keeps telling me I have syntax error, that I am missing a semicolon.
Your code so far

const myStr = "I am a \"double quoted\" string inside\ "double quotes\"."; // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.5 Safari/605.1.15

Challenge: Basic JavaScript - Escaping Literal Quotes in Strings

Link to the challenge:

Look at the color of the letters in the code you posted. That should give you a hint.

Thank you sir, bur now its telling me I should have 2 (") and 4(")?

const myStr = "I am a \"double quoted\"string inside\"double quotes\"."; // Change this line

You are missing spaces in your string

Also, for challenges like these make sure to look at the console output.

It will show you where your mistakes are so you can fix them

1 Like

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