Javascript basic execution order
<p>I know PHP, server-side scripts, run first and output the html to the browser, then javascript is executed. However, I am trying to get a feel for how the javascript is executed and can't quite figure it out.</p>

<p>Is Javascript executed top-down and is consistent with this top-down execution? I am dynamically creating javascript in PHP which is triggered by events in my webpage's original javascript.</p>

<p>Will created JS execute exactly where I put it or will it fire before? after?</p>

<p>Thanks</p>
