JSFiddle - React, Tailwind, and code Playground

JavaScript

var C = function( ) {
        this.x = 10 , this.y = 20 ;
        this.modify = function( ) {
            this.x = 30 , this.y = 40 ;
            console.log("(!) C >> " + (this.x + this.y) ) ;
        } ;
    } ;

    var A = function( ) {
        this.modify = function( ) {
           this.x = 300 , this.y = 400 ;
           console.log("(!) A >> " + (this.x + this.y) ) ;
        } ;
    } ;
        A.prototype = new C ;

    var B = function( ) {
        this.modify = function( ) {
           this.x = 3000 , this.y = 4000 ;
           console.log("(!) B >> " + (this.x + this.y) ) ;
        } ;
    } ;


    new C( ).modify( ) ;
    new A( ).modify( ) ;
    new B( ).modify( ) ;