title: In moment.js, what's the meaning and the use of wrapping script in !function()
body: <p><strong>EDIT :</strong> This question was marked as duplicate, which is quite unfair.I acknowledge that <a href="https://stackoverflow.com/questions/3755606/what-does-the-exclamation-mark-do-before-the-function">this question about the question mark</a> answers <em>a part</em> of the question. But the following is still mysterious to me. Thanks a lot !</p>
  
  <p><strong>ORIGINAL QUESTION :</strong> 
  I am trying to understand an external script (moment.js) which shows : </p>
  
  <pre><code>! function(a, b) {
      "object" == typeof exports &amp;&amp; "undefined" != typeof module 
           ? module.exports = b() 
           : "function" == typeof define &amp;&amp; define.amd 
               ? define(b) 
               : a.moment = b()
    }(this, function() {
        "use strict";
        [... folowing code goes here]
  </code></pre>
  
  <p>I understand the use of a immediately invoked scoping function like :</p>
  
  <pre><code>(function(){[ code here ]})();
  </code></pre>
  
  <p>And I guess it's about that. Can someone explain to me what is happening here?</p>