>> > var myObject = new femalePatient(37);
>> >
>> > alert(myObject.age); // alerts 42
>>
>> This shows the OOP limitations of Javascript. In a real-world
>> femalePatient
>> object, the age property would be unavailable. ;-)
>
>Yep. A proper Java class would limit access to a getter method, whichs
>throws an exception when called...

Actually, should it divide the age by 2? That it actually outputs 21? ;)


_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to