<pre data-sub="prettyprint:_">
        document.write("<script>");
        document.write("document.write('<h2>This is the quoted script</h2>')");
        document.write("</" + "script>");
        //document.write("</script>");  this does not work
        //but you can use document.write("<\/script>");
        </pre>