LearnHow to Write a Module in JavaScript – Quick Tip

Jim Hoskins
writes on May 23, 2013

Share with your friends










Submit

In this Treehouse Quick Tip, teacher Jim Hoskins will show you how to write a simple JavaScript module. Modules are useful in writing JavaScript, because they allow us to write code that is less likely to interfere with other code on our page.

It allows us to selectively expose parts of the code to other programs running on our page. This makes our JavaScript code more resilient and easier to maintain.

One Response to “How to Write a Module in JavaScript – Quick Tip”

  1. kovaldn on May 24, 2013 at 4:43 am said:

    very useful, thank you!

Leave a Reply

Want to learn more about Javascript?

Learn how to use JavaScript to add interactivity to websites.

Learn more