example
In the above example, we have an Object Name that studentObj and property are firstname, lastname and class.
Adding Method Object
common forms
objName.method_name = function_name;
To add a method to the object, we need to create a method first and then do the same form above.
Creating Object Alternative forms
example
Creating Object Constructor
example
In the above example to create Object through a constructor, we have to create a function Create Object function.
Monday, May 5, 2014
13.Create Object
Subscribe to:
Post Comments (Atom)






0 comments:
Post a Comment