Javascript

Status
Not open for further replies.

as4s1n

New Member
Messages
174
Reaction score
4
Points
0
I've been experimenting with javascript a little bit. I stumbled upon the Prototype object. I don't understand it. I know you give a custom property to it when using it but i don't understand how it works and what it does by doing that...

Please help
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Prototypes provide an inheritance mechanism, like parent classes in other OO languages. When you access a property that isn't defined on an object, it checks that object's prototype, and then the prototype's prototype &c, just like checking base instances in other languages. Numerous pages describe the prototype property--try "Object Oriented Programming in JavaScrip" by Mike Koss.
 
Status
Not open for further replies.
Top