The difference between the method defined using the following two
<p>Snippet1:</p>

<pre><code> var box = function() {};

 box.prototype.open = function {
 };
</code></pre>

<p>Snippet2:</p>

<pre><code>  var box = function() {
      this.open = function() {
      };
  }
</code></pre>

<p>Any difference between those two, which one is better?</p>
