Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
// File log.js
define(['logModule'], function(){
// export (expose) foo for other modules
return {
log: function(){
console.log('Example of AMD module system');
// File index.js
require(['log'], function (logModule) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment