correct pattern to use: this or prototype
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/310870/use-of-prototype-vs-this-in-javascript">Use of &#39;prototype&#39; vs. &#39;this&#39; in Javascript?</a>  </p>
</blockquote>



<p>If I have an object function, when should I use <code>this.something</code> instead of <code>func.prototype.something</code> ?</p>

<p>Just to clarify:</p>

<pre><code>function Person()
{
   this.walk=function(){...};
}
</code></pre>

<p>instead of:</p>

<pre><code>function Person()
{}
Person.prototype.walk=function(){...};
</code></pre>

<p>When is convenient to use one form instead of the other? what are benefits and drawbacks of the two solutions ? Expecially in the case I'm using always <code>var person = new Person();</code></p>
