Basic JavaScript - Escaping Literal Quotes in Strings

it says I’m wrong and i don’t understand how
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge: Basic JavaScript - Escaping Literal Quotes in Strings

Link to the challenge:

1 Like

Make sure to leave a space after your ‘I am a…’ to separate it from your first set of double quotes.
Your second set of double quotes should be escaped using the \ character as well.

1 Like

still not working it is not working

Can you post your updated code? Paste it between the ```` marks that appear when clicking the </> button:

If you have a question about a specific challenge as it relates to your written code for that challenge need some help, click the Ask for Help button. This button will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.

Thank you.

2 Likes

you didn’t placing a backslash at your 2nd string quote, like what you did with the 1st string quote.
good coding !

1 Like

you can try Template_literals

You no longer have to worry about translating symbols

While that is useful information, that’s not what the Challenge is asking for.

(⊙o⊙)… I didn’t notice this was an exam question, sorry

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