Is it possible to add HTML within an If statement in Javascript and Close the Script Tag?
<p>I am a beginner with Javascript and I'm trying to create one IF call. The goal is to say "If the screen size is > X then input my adsense code.</p>

<p>If this were PHP when I could create a PHP tag and then close it and insert the html then close the IF tag in PHP. Is this possible in Javascript? Here's what my code looks like in an ideal world.</p>

<pre><code>&lt;script type="text/javascript"&gt;
if ( $(window).width() &gt; 739)  {
    document.write('&lt;div id="banner-left"&gt;');
&lt;/script&gt;

[My Adsense Code]

&lt;script type="text/javascript"&gt;
} //close if
&lt;/script&gt;
</code></pre>

<p>Tried this and definitely doesn't work. Is there another way to do this without rewriting the Adsense code in full javascript?</p>

<p>Thanks for taking the time to look through my question.</p>