Var myStr = "I am a /"double quoted/" string inside /"double quotes./";"

Tell us what’s happening:
I have tried like for one hour and there is not happening.

Your code so far
var myStr = “I am a /“double quoted/” string inside /“double quotes./”;”

var 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/88.0.4324.96 Safari/537.36 Edg/88.0.705.50.

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

Hi and welcome to the forum!

You are making a string, so the contents must be surrounded by double quotes. But this string contains quotes, so the internal quotes need to be escaped (which you have done).

Your string is not inside double quotes.

Also, look again at what the escape character is.

1 Like

I have tried double quotes at the beginning and end plus the escape before and after the double quotes inside. I have deleted them, is not happening.

You cannot have a string without opening and closing ". You must surround your string with ",

SyntaxError: unknown: Unexpected token, expected “;” (1:22)
this is what appears.

Please post your current full code.

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

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).

As @ArielLeslie said, your escape character is not correct:

In JavaScript, you can escape a quote from considering it as an end of string quote by placing a backslash (\) in front of the quote.