What's the difference between declaring a function by itself or attaching it to window?
<p>Sorry, that title probably doesn't make much sense, but what I want to know is the difference between:</p>

<p><code>window.myfunc = function(){}</code></p>

<p>and</p>

<p><code>function myfunc(){}</code></p>

<p>With jsfiddle, the functions only seem to work when attached to window. I'm assuming this is something to do with how it's set up to read the javascript and html separately, but that there is otherwise no difference?</p>
