JavaScript: The prototype Property

F8a70e01eddbadc5e4f9876ff34494fa?s=47 Guille Paz
November 01, 2012

JavaScript: The prototype Property

JavaScript has strong object-oriented programming capabilities, even though some debates have taken place due to the differences in object-oriented JavaScript compared to other languages.


Guille Paz

November 01, 2012


  1. 9.

    Class A Class defines Objects Properties An object characteristic, such

    as color Methods An object capability, such as walk Thursday, November 1, 12
  2. 18.

    Prototype-based programming Class free Classes are not present Not Object

    Oriented Everything is public Objects inherits from another objects Thursday, November 1, 12
  3. 46.

    Constructor Functions Classes Create diferents instances ==> Objects Use new

    operator Accepts parameters Returns an instance ==> Object Thursday, November 1, 12
  4. 52.

    Prototype A property Defines properties and methods to all instances

    Works with new operator Stored in the memory once Contain an Object initial value === empty Object === {} Thursday, November 1, 12
  5. 61.

    Inheritance A new “class” is created from another “class” Extends

    functionality Defines new attributes and methods A way to reuse code All Object inherit from Object.prototype 12+ ways to inherits in JS Thursday, November 1, 12