I think I've finally managed to get a handle on prototyping with JavaScript, after all that lisping and jQuerying it turned out to be a formality in the end. I have to thank Steve for finally getting my ass off the couch though.

At first I started thinking about how to do something similar to a classical OO system and I found an example, quite a lot isn't it? It didn't seem to rhyme very well with what Steve wrote either, about how instances inherit instances.

Let's take a look at something very simple and also let's start from the very beginning in case you're really indoctrinated and find this hard to wrap your head around. Don't sweat it if you do, I've had major problems too.

First of all we have to realize that a function is not just a function in the traditional sense, it is but at the same time it isn't, it's just that the choice of wording is horrible, anything but function would have been better. Anyway, the function keyword in JavaScript can basically function as the class word in other languages. Lets take a look at a simple example: