Posted on October 4, 2007 at 10:18 am
A trick I learnt from MochiKit
One of the cool things about javascript is prototypal inheritance. The not so cool thing is that I often forget to put a new before a constructor call. A constructor call is nothing but a function call with a ‘new’ prefix. Forget the new prefix and the `this` passed to the function is the global [...]