JavaScript & jQuery Tutorials

JS Home Right Arrow JS Reference Right Arrow Object Right Arrow prototype

prototype  Object  class property


Enables property assignment to objects of type Object.

  • All objects are descendants of Object.
  • All objects inherit their properties and methods from Object.prototype.
  • So when overriding an Object method such as valueOf(), you would override as follows:
    yourObject.prototype.valueOf = function functionName {your override code}
  • Like all class properties prototype should be used on the class rather than an instance of the class.


Signature Description
Object.prototypeEnables property assignment to objects of type Object.




The code below displays Object prototype.

alert('Object prototype is ' + Object.prototype);

Press the button below to action the above code:

Related Tutorials

JavaScript Advanced Tutorials - Lesson 5 - Elegant Object Creation


go to home page Homepage go to top of page Top