Created
November 11, 2011 18:13
-
-
Save trivektor/1358737 to your computer and use it in GitHub Desktop.
Javascript prototype notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Prototype is intimately tied to constructors so calls to prototype only works on a constructor function (for example Fruit) | |
Prototype is more memory efficient (50 copies of the eat function for 50 fruit instances) but could be harder to read and maintain | |
Prototype works in a delegation fashion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment