Literal quotes escaping

Tell us what’s happening:
Describe your issue in detail here.
idk what i did wrong?

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


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_5) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.1 Safari/605.1.15

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

HI @chrisbatista189 !
Welcome to the forum!

You have syntax errors.

Take a close look at the example again.

\"Peter is learning JavaScript\"

You see how they are using backslashes \ not forward slashes/.
Also the second backslash should go just before the second double quote.
This is the correct syntax.

\"word\"

Once you clean up the syntax issues, then the test will pass.

1 Like