JavaScript » Object » prototype

Syntax:
Object.prototype.name = value

This allows the addition of properties and methods to any object.

Any object that can call a constructor function has a prototype property allowing the addition of properties and methods.

Examples

Code:
Cat.prototype.color = null
Sheeba.color = "black"
Explanation:

This example first creates a 'color' property for the 'Cat' object, and then creates a specific instance of it.