Understanding Prototypes, Delegation & Composition

added by bpwndaddy
6/16/2015 3:54:25 PM

2 Kicks, 206 Views

In the last post we covered the basics of creating and using Javascript objects, which included using new to invoke functions as constructors. In this post, we're going to focus on the following: how Javascript's prototype based objects work building up functionality through pseudo-classical inheritance via constructor functions and the prototype chain and a simpler, more idiomatic way to build up functionality using composition, delegation and mixins.


0 comments