Object JavaScript – Code Walkthrough Initializing a Module That Needs RequireJS, jQuery, LoDash
RequireJS is a JavaScript file and module loader. In Getting Started with Modules Using RequireJS, you have learned a lot about how you can use it to load your dependencies using
define()
and require()
.
In this code snippet, you will learn how you can load the dependencies, initialize a module with values that you pass in, and then make public some of the methods.
And you will see how to put files in folders to help keep identify which modules you write in your app and which modules are from third parties.