Friday, May 29, 2009

Creating objects in javascript

http://javascriptkit.com/javatutors/object.shtml

This will help in understanding the main concept of prototype chaining in Java-Script.
This also explains the need to maintaining the correct order while writing the code.

Prototype chaining helps in implementing concept of inheritance in javascript code.
This web site explains this with the help of circle and sphere example. It explains that how circle class method and properties can be used in sphere class.

function mySphere(x,y,z,r){
// DO SOME THING
}

mySphere.prototype = new circle();

No comments:

Post a Comment