O'Reilly logo

JavaScript for .NET Developers by Ovais Mehboob Ahmed Khan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Object-oriented programming in JavaScript

All the objects in JavaScript are inherited from an object. JavaScript provides different patterns to adhere to the object-oriented programming (OOP) principles when building applications. There are different patterns, such as constructor patterns, prototype patterns, and object literal representation, and, with ECMAScript 6, a completely new way of representing objects through classes and inheriting a base class using the extends keyword.

In this section, we will see how we can implement the OOP principles with different methodologies.

Creating objects

A class represents the structure of an object and every class has certain methods and properties used by the object, whereas an object is an instance of a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required