Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:
Describe your issue in detail here.
could someone please explain to me what im doing wrong?

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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Safari/605.1.15

Challenge: Basic JavaScript - Escaping Literal Quotes in Strings

Link to the challenge:

Hello!

You have a small problem with the quotes. Just before the ;, you have this character , which is not expected. The correct double quotes are these: ".

The difference may be subtle to us, but for the code interpreter is very different :slight_smile:

Also, if you have problems with your code, check the console to see if there’s any indication of a problem, see here:

SyntaxError: unknown: Unterminated string constant. (1:12)

> 1 | var myStr = "I am a \"double quoted\" string inside \"double quotes\".”; // Change this line
    |             ^

The error means that you didn’t close the string correctly (by using a different character).

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