Prototype OOP example

QnA
Sat, 24 Dec 2005 19:49:04 -0000

Hi,

Here is what I want to do:

Labour = Class.create();
Labour.prototype = {
    initialize:function(name){
        this.name = name;
    }
}


What I want to do is create a class called "Worker" which will inherit
from
"Labour", and the signature of "initialize" is
"function(name, position)".

May I ask what should do?


Thank you all very much for the kindly help.
Wish you all with a Merry Christmas.


Regards,
QnA