Object-Oriented JavaScript Fundamentals

Most developers are used to writing simple functions in JavaScript, but JavaScript is also an object-based language that lends itself well to polymorphism and design patterns. Everything in JavaScript exists as an object, including functions, and these JavaScript objects are loosely typed and can be extended at run time. Instead of an inheritance based on class definitions, JavaScript objects inherit their behaviors through prototypes, and they can also be assigned behaviors at run time. To create an object in JavaScript, the function keyword is used to create an object constructor, which is called with the new keyword to create an object instance. Understanding the inheritance model of JavaScript is vital ...

Get Developing Service-Oriented AJAX Applications on the Microsoft® Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.