Extending JavaScript Objects and Classes
Summary You can dynamically create properties and methods of existing objects through simple assignment. Using the prototype property of intrinsic JS Objects, you can extend the functionality of the...
View ArticleOOP in JS, Part 1 : Public/Private Variables and Methods
This page shows how to create private variables and methods in “classes” in Javascript through the rather simple example of a person. (This is really a very rough approximation of the classical OOP...
View ArticleOOP in JS, Part 2 : Inheritance
This page shows how to create private variables and methods in “classes” in Javascript through the rather simple example of a person. (This is really a very rough approximation of the classical OOP...
View ArticleA Base Class for JavaScript Inheritance
NB. I’ve amended the code samples below to reflect recent changes in this class. I’m an OO programmer at heart and JavaScript supports prototype based inheritance. Unfortunatley this leads to verbose...
View Article