Link Search Menu Expand Document

Escaping Literal Quotes in Strings

Summary

  • To use a " or ' inside a string, place a backslash (\) before and after the quote.

Final Code

var myStr = "I am a \"double quoted\" string inside \"double quotes\"."; // Change this line