Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
First posted :
03/24/2008
Times viewed :
280
JavaScript Object Orientation
Introduction
Object orientation can be a big advantage once you
understand it. It allows you to reuse your code. You won’t need to write it
again and again. You can inherit you existing code to provide some basic
functions and extend it with the new features.
Example
The following example creates three functions - Building,
BuildingValue and Motel. The Motel function is derived from the Building
function and therefore it contains all the features from that. After that I
just create a new object of the function Motel and call the properties
constructionYear and BuildingValue, which are both derived from the Building
function.