title: Advantage of Javascript object prototyping?
body: <p>I recently started learning about prototypes in Javascript.  I am confused about the advantage of adding methods into a prototype.  Here is an example of what I am thinking</p>
  
  <p>One way to calculate the area of a circle could be like this</p>
  
  <pre><code>function Circle(radius, area){
    this.radius = radius;
    this.area = (radius*radius*Math.PI);
  }
  </code></pre>
  
  <p>But then another way would be like this</p>
  
  <pre><code>function Circle(radius, area){
    this.radius = radius;
  }
  
  Circle.prototype.area = function(){
    return this.radius*this.radius*Math.PI
  }
  </code></pre>
  
  <p>What is the advantage to making the area method a part of the prototype versus putting a method directly in the constructor?</p>