I understand that javascript can use functions as objects or classes.
But how do I learn how this all works together?
For instance, in the copy of the DynAPI javascrpt file you can see this bit of code
Code:
function DynObject() {
this.id = "DynObject"+DynObject._c++;
DynObject.all[this.id] = this;
};
Where is .id defined? Is it an element of the DynObject class that is
predefined with all javascript classes? Is the same true for the element .all as well?
Following this object declaration (if that is what it is) there is this
line of code:
Code:
var p = DynObject.prototype;
Where is .prototype defined? Is it also a predefined element?
How is it used?
Bookmarks