title: Named module vs Unnamed module in RequireJS
body: <p>We can create a module in requireJS by giving it a name:</p>
  
  <pre><code>define("name",[dep],function(dep) {
        // module definition
  });
  </code></pre>
  
  <p>or we can create one excluding the name:</p>
  
  <pre><code>define([dep],function(dep) {
        // module definition
  });
  </code></pre>
  
  <p>Which is the better way to create a module? I know RequireJS recommends to avoid assigning module names.</p>
  
  <p>But I want to know in what scenarios we do and do not have to give a module a name. Does this affect usage? What are the pros and cons of each way?</p>