Object-Oriented JavaScript — Class Inheritance

Object-Oriented JavaScript — Class Inheritance

Single and multiple class inheritance.

JavaScript is partly an object-oriented language.

To learn JavaScript, we got to learn the object-oriented parts of JavaScript.

In this article, we’ll look at JavaScript subclasses, mixins, and multiple inheritance.


We can create subclasses from a JavaScript class.

For instance, we can write:

class Animal {
  constructor(name) {
    this.name = name;
  speak() {
    console.log(`${this.name} speaks`);
class Dog extends Animal {
  speak() {
    console.log(`${this.name} woofs`);
const mary = new Dog('mary');

to create the Animal class.

The speak method is in the Animal class.

technology javascript

Bootstrap 5 Complete Course with Examples

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Building a simple Applications with Vue 3

Deno Crash Course: Explore Deno and Create a full REST API with Deno

How to Build a Real-time Chat App with Deno and WebSockets

Convert HTML to Markdown Online

HTML entity encoder decoder Online

JavaScript Shopping Cart - Javascript Project for Beginners

JavaScript Shopping Cart - javascript shopping cart tutorial for beginnersBuy me a coffee 🍺 https://www.paypal.com/paypalme/ziddahSource Code: https://bit....

The essential JavaScript concepts that you should understand

The essential JavaScript concepts that you should understand - For successful developing and to pass a work interview

Top five technologies among young entrepreneurs

With transformational changes seen in the business and technology front, Entrepreneurs’ view towards technologies is changing. Here are [the top technologies that young entrepreneurs can embed to increase their business...

Top 10 Trending Technologies Must Learn in 2021 | igmGuru

Get updated with the newest top 10 trending technologies in 2021 which professional must learn to boost there career.

My Channel on Javascript Technologies | All About Javascript

My Channel on Javascript Technologies @tkssharma | All About Javascript