When you write JavaScript, it’s easy to write code for one page without worrying about its impact on other scripts. But when you start working within a large application with many other developers, you now need to be aware of your impact in your software neighborhood.
I’ll provide some techniques to help organize JavaScript pages into modules using the closure pattern, provide easy ways to help namespace all of your functions and objects, and provide easy ways to encourage code re-use using prototypes with new HTML5 techniques.
This discussion can be directly applied to theme developers, plugin authors, WordPress core developers, and all web developers who use JavaScript.