Object-Oriented Javascript

Although Javascript shouldn’t be classed as an object-oriented language, pretty much everything within it is object based; from DOM scripting through to specific built-in objects such as Image and Date. This basically means that we can adopt some OOP concepts but not all. Javascript handles objects in a number of ways; a developer can define […]

Although Javascript shouldn’t be classed as an object-oriented language, pretty much everything within it is object based; from DOM scripting through to specific built-in objects such as Image and Date. This basically means that we can adopt some OOP concepts but not all.

Javascript handles objects in a number of ways; a developer can define an object and then instantiate with the new operator, a developer can declare an object on the fly using the object literal or a developer can extend an existing object (either built-in or user-defined) using its prototype.

DOM, OOP