Escaping Literal Quotes in Strings 43

Tell us what’s happening: I believe this is the correct answer but I keep on getting this response?

You should use two double quotes ( " ) and four escaped double quotes ( \" ).

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

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

Hey @info123,

Try console.log(myStr) and then compare the log with this text:
I am a "double quoted" string inside "double quotes". Remember, the test is sensitive.

1 Like

correct: “I am a “double quoted” string inside “double quotes”.”

incorrect: “I am a"double quoted” string inside"double quotes"."

I think this should be the answer;;
Can you notice the error? :grin:

Pro-Tip: Use copy-paste, makes life easier and helps reduce errors that might creep in :wink: :stuck_out_tongue_winking_eye:

1 Like

This is what I got after

I am a"double quoted" string inside"double quotes".
myStr = “I am a"double quoted” string inside"double quotes"."

How do I correct my error?

1 Like

you just need to add the missing spaces

2 Likes

Notice that there is supposed to be a space between a few letters :+1:t2:

Got it. Thank you all!

1 Like