Escaping Literal Quites in strings

Tell us what’s happening:
Describe your issue in detail here.
I dont know whag im doing wrong. I did as per video and hints but its correct on the test but wrong when i run it.

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
console.log(myStr)

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 12; SM-A135F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

You didn’t use the escape character on these internal quotes. You should be getting a syntax error.

Thanks for your swift reply JeremyLT.
Please, which one is an escape character? Been stuck on this for couple of days now.:smiling_face_with_tear:

Escape character is \ (backslash) before your quote char.
i.e : Mod Edit: SOLUTION REDACTED
Same goes for all meta-chars ; backslash itself is escaped as \\.
Good luck ! :slightly_smiling_face:

1 Like

Thank you so much @Kline . You the best. Got it right now👌🏾

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

1 Like

My bad, didn’t know this was the full solution of the exercise. Will be careful next time :+1:

1 Like