title: global JS variables not available to functions defined in included JS files
body: <p>I'm trying to use a global JS variable that's dumped on the page by a view/template used to drive a JS solution. This has worked fine in a number of environments, but this week I've found one environment where my defined function (which is in an external JS included via a script tag) doesn't seem to access it.</p>
  
  <p>When I step through the page line by line watching the variable in Chrome's dev tools, I can see the variable get declared in the global namespace, and it drops out of scope when the other function is called.</p>
  
  <p>What is the explanation and how can I predict when this will/won't happen in the future? I've used other global variables through functions before... I haven't seen this though...</p>
  
  <p>The function is ran on a $(document).ready() call.</p>