Enjoy 20% off all plans by following us on social media. Check out other promotions!
Quiz Questions

Why is it, in general, a good idea to leave the global scope of a website as-is and never touch it?

Topics
JAVASCRIPT
Edit on GitHub

JavaScript that is executed in the browser has access to the global scope, and if everyone uses the global namespace to define their variables, collisions will likely occur. Use the module pattern (IIFEs) to encapsulate your variables within a local namespace.

Edit on GitHub