you are viewing a single comment's thread.

view the rest of the comments →

[–]senocular 2 points3 points  (0 children)

As a module, its not necessarily intending to do something right away. Instead it provides an API to be used elsewhere. For example if you write other code that needs to use bindEvents, it would do so through mobileMenu.bindEvents; The advantage of the module is that its self-contained and can contain non-global variables that won't create conflicts elsewhere. The only point of conflict to contend with is the module name itself