Find what JavaScript variables are leaking
Detecting variables that are mistakenly or unknowingly added to the global scope can be helpful to debug your apps and avoid naming collisions. The more a web app and its dependencies grow, the more having a good understanding of what’s happening in the global scope becomes important (e.g., to ensure multiple libraries — or even multiple apps! — can coexist on the page without global name collisions).
Source: Find what JavaScript variables are leaking into the global scope, an article by Matteo Mazzarolo.