title: Get all Javascript Variables?
body: <p>Is there a way for javascript to detect all assigned variables? For example, if one js file creates a bunch of vars (globally scoped), can a subsequent file get all the vars without knowing what they're named and which might exist?</p>
  
  <p>Thanks in advance :)</p>
  
  <p>EDIT, Question Part 2:</p>
  
  <p>How do I get the values of these variables? Here is what I have attempted:</p>
  
  <p>This is what I ended up with, as per comment suggestions:</p>
  
  <pre><code>for (var name in this) {
      variables[name] = name;
      variables[name]=this[name]
  }
  </code></pre>