See this example of a simple circle class with a prototype area method:
var Circle = function(radius) {
this.radius = radius;
}
Circle.prototype.area = function() {
return Math.PI*this.radius*this.radius;
}
What's the difference between the area function declared above and if it were just declared as a public method of the Circle in the first place? Either way, individual instances of circle have their own area, do they not? What's the difference??
this.area = function(){return Math.PI*this.radius*this.radius;}