O'Reilly logo
  • Patrick S thinks this is interesting:

You can include as many functions in the prototype as you would like. Each time a new object is created those functions will be available.

function UserP(first, last){
  this.first = first;
  this.last = last;
UserP.prototype = {
  getFullName: function(){
      return this.first + " " + this.last;


Cover of Node.js, MongoDB, and AngularJS Web Development


using Prototype to extend objects