Is there a way in Javascript to get a list or dump the contents of all global variables declared by Javascript/jQuery script on a page? I am particularly interested in array
To get "globals" object you can use this function:
function globals() { return this; }
Here is the test: http://jsfiddle.net/EERuf/