Is there any tool or regexp that might help to get list of all global variables in JavaScript project?
You can loop through the window object for querying all globally defined data (variables and functions, including predefined ones):
for (var key in window) {
console.log(key + "=" + window[key]);
}
For analysing the source code, use JSLint.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With