Dec. 28th, 2007
A few months ago, I asked what the new operator does in Javascript. There wasn't much of a response, but I did eventually figure it out. Sometimes you just have to wade through the specifications. Here's the outcome of my research:
( Deep geekery ahead! )
I just wanted to put that somewhere where it wouldn't get lost.
It also took me a while to realize that Result(N) means "the product after performing the operation of step N.
The new keyword allows you to define objects with prototypes, so that you can have a class heirarchy that doesn't require external maintenence. I strongly suspect that Doug Crockford's lecture on "prototypal inheritance" would be edifying here.
( Deep geekery ahead! )
I just wanted to put that somewhere where it wouldn't get lost.
It also took me a while to realize that Result(N) means "the product after performing the operation of step N.
The new keyword allows you to define objects with prototypes, so that you can have a class heirarchy that doesn't require external maintenence. I strongly suspect that Doug Crockford's lecture on "prototypal inheritance" would be edifying here.