JavaScript Class Patterns
- by Liam McLennan
To write object-oriented programs we need objects, and likely lots of them. JavaScript makes it easy to create objects: var liam = {
name: "Liam",
age: Number.MAX_VALUE
};
But JavaScript does not provide an easy way to create similar objects. Most object-oriented languages include the idea of a class, which is a template for creating…