JSFiddle - React, Tailwind, and code Playground

by matmuchrapna

JavaScript

function A() {
    this.a = 1;
}

function B () {
    A.apply(this);
    this.b = 1;
    this.get = function() {
        console.log(this.a + this.b);
    };
}

new B().get(); // 2