Chapter 10. JavaScript Object-Oriented Programming

JavaScript is an object-oriented programming language. In object-oriented programming (OOP) languages, we use the concept of objects rather than actions to develop applications. In the past, JavaScript had no real foundation and was just a basic language. JavaScript is not a fully OOP-based language like JAVA, C#, and other programming languages, but it still has many OOP features.

There are many features in JavaScript where code is reused. So, rather than using procedural concepts in JavaScript, we use object-oriented programming techniques. There are four basic principles of object-oriented programming.

Polymorphism

Since JavaScript is a dynamic language, it supports polymorphism. Polymorphism ...

Get Web Developer's Reference Guide 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.