is prototyping different than directly naming the function?
<p>For exampleis this:</p>

<pre><code>function obj(val) {
    this.val = val;
}
obj.prototype.newfunction = function(){
    return this.val;
};
</code></pre>

<p>Different than this in any way at all?</p>

<pre><code>function obj(val) {
    this.val = val;
    this.newfunction = function(){
        return this.val;
    }
}
</code></pre>

<p>I realize that the reason for <code>prototype</code> is so that you can add methods to objects that you didn't create, but is there any reason to use the second block over the first, or vice versa?</p>
