How to Write a Module in JavaScript – Quick Tip

javascriptQuickTips

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.

Free Workshops

Watch one of our expert, full-length teaching videos. Choose from either HTML, CSS or Wordpress.

Start learning

Jim Hoskins

Jim Hoskins is an expert teacher at Treehouse. Twitter: @jimrhoskins

Comments

One comment on “How to Write a Module in JavaScript – Quick Tip