var Class = {
Create:function () {
return function () {this.initialize.apply (this, arguments);}
}
}
Compare this with the code below to see what you understand.
var changed={item: "Banana", act: "Eating"};
var original={
Item: "Chair",
Act: "Sitting in",
Ask:function () {
Return "Who ' s been" +this.act+ "my" +this.item;
}
};
Originally, the way to define a class above is to use an array. Create is a key to an array. Its value is a funciton. Didn't understand it before,
Create:function () {
return function () {this.initialize.apply (this, arguments);}
}
Form code. Now it seems to be the JS array element.
All things in JS are considered objects. In the following code. Original is an array object. Original.ask is a way to access an element of an array using object access
Original.ask.call (changed));
JS code defines the comprehension of class code