Question this week:
I thought Yangshun's explanation is concise so I'll just leave it here verbatim:
Every script 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.
That's all for today, please leave any comments/questions/corrections in the comments. Thanks!
And an additional thank you to Flatiron alum: Marissa O. who is a badass developer at Forbes magazine for directing me to his blog!
Claim your page on DEV before someone else does
Level up every day