Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Re your answer to Camsoft: That's a totally different question; I've updated my answer to address it. Commented Jan 12, 2010 at 19:42
  • 4
    It's just a general question, being more specific wont help much since I'm working with an obscure API with poor documentation.
    – Ian
    Commented Jan 12, 2010 at 19:43
  • You mean global variables! You can display the enumerable global variables using for (v in this) alert(v);. Not all globals are enumerable, though, and I know of no standard way to get a list of the non-enumerable ones. Commented Jan 12, 2010 at 19:44
  • 2
    @Jason - No, the question is clear. Inside a function the variables in scope will include global variables, this, arguments, parameters and all variables defined in enclosing scopes.
    – Tim Down
    Commented Jan 12, 2010 at 20:18
  • 3
    This is why I miss Perl's symbol tables. Any plans to add this to a future release of Javascript?
    – Dexygen
    Commented Sep 27, 2015 at 11:15