Not able to get the correct output

Plz tell the correct syntax as not getting desired output from this.

const myStr = “I am a “double quoted” string inside “double quotes”.”
My output:
myStr = “I am a “double quoted” string inside “double quotes”.”
Desired Output:

I am a "double quoted" string inside "double quotes".

Challenge: Escaping Literal Quotes in Strings

Link to the challenge:

Hi @devu2732,

In JavaScript, you can escape a quote from considering it as an end of string quote by placing a backslash ( \ ) in front of the quote.

The value of myStr is missing a ‘’ to escape the inner quote.

Cheers, Smeagol

1 Like

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