Global variables in Javascript across multiple files
<p>A bunch of my JavaScript code is in an external file called helpers.js. Inside the HTML that calls this JavaScript code I find myself in need of knowing if a certain function from helpers.js has been called.</p>

<p>I have attempted to create a global variable by defining:</p>

<pre><code>var myFunctionTag = true;
</code></pre>

<p>In global scope both in my HTML code and in helpers.js.</p>

<p>Heres what my html code looks like:</p>

<pre><code>&lt;html&gt;
...
&lt;script type='text/javascript' src='js/helpers.js'&gt;&lt;/script&gt;    
...
&lt;script&gt;
  var myFunctionTag = false;
  ...
  //I try to use myFunctionTag here but it is always false, even though it has been se t to 'true' in helpers.js
&lt;/script&gt;
</code></pre>

<p>Is what I am trying to do even doable? </p>

<p>Thanks,</p>
