You can escape with a backslash or use single quotes around the string:
var array=["famous quote by Shakespear is","\"to be or not to be\""];
var array=["famous quote by Shakespear is",'"to be or not to be"'];
Single and double quotes are interchangeable as long as you pair them correctly.
0
solved Escaping single quote and double quote in JavaScript [duplicate]