Basic JavaScript - Escaping Literal Quotes in Strings

Tell us what’s happening:

Describe your issue in detail here.
This one is driving me nuts! What am i missing or doing wrong

Your code so far

var myStr = "i am a \"double quoted"\ string inside \"double quotes"\.";
console.log(myStr)

Your browser information:

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

Challenge Information:

Basic JavaScript - Escaping Literal Quotes in Strings

You appear to have created this post without editing the template. Please edit your post to Tell us what’s happening in your own words.

I have tried over and over and i camt seem to pass this one and i am asking humbly for someone to educate me to be able to identify my error and move forward

You simple have switched the positions of the last backwards slash and the last quotation marks on each of the words.

1 Like

Thank youfor your reply. I have tried it with the backslash and quotations switched but even then it still wont allow me to pass. How may i resolve this? I appreciate your help and guidance.

Hello @Kandace !

I see that you mentioned you have already corrected the last \ in each of the two escapes.
Well done.

Now, I believe if you change the i at the beginning of the sentence to uppercase I you should be able to move on to the next step.

If this helps you to move on to the next step, please be kind and check Solution by MCRBLX for the great guidance provided to you?

Keep up the good progress and happy coding!

My apologies but I thought that escaping quotes was like this (if I misremember it, please correct me, i used [backslash] because it wont let me use real backslashes) :
let string = “This string [backslash]“escapes here[backslash]”.”;

1 Like

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