hackernoon.com
Writing your first JavaScript library
Let's get started by introducing what a library is, in JavaScript. Any program or functions you write to perform actions in your WebApp, for instance, is bundled up into a module that can be easily reused anywhere, instead of just adding the code directly to the scripts, just for your app's use.