Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:

Describe your issue in detail here.

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/ Safari/537.36

Challenge Information:

Basic JavaScript - Escaping Literal Quotes in Strings

Hey @karirakudzaishe99 welcome to the fCC forum :smiley:
Kindly tell us the problem with your own words.This will enable us to help you.

Happy coding!!

i am failing to put string into variable myStr

You code is just Ok just add space between the a and the backslash \

And between the quote marks and the text here

I think it will pass
Happy coding!!

it is still not working it is saying
Failed:Variable myStr should contain the string: I am a "double quoted" string inside "double quotes".

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

Welcome to the forum

If you look closely at the first and last quote marks for myStr, you’ll notice they have a different format to the other quote marks appearing in the rest of the string.

This is the main reason why your code isn’t passing.

In the image above, the quotes within the string are missing the back slash symbol.

Happy coding

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