List all global variables in JavaScript

An easy way to list all of the global variables available the window object:

keys(window);

// returns array obj
// ["window", "location", "external", "chrome", "document", "$", "jQuery", "_gaq"]

comments powered by Disqus