How to Create a JavaScript Module (NodeJS, Browser)
Module support in JavaScript has gone through major changes over the years. This article covers how to create a JavaScript module that works in both NodeJS and a modern browser.
If you need to work with older code, I will provide links at the end of this article for resources.