JSFiddle - React, Tailwind, and code Playground

by gianlucaguarini

JavaScript

var SuperClass = function() {
    this.init = function (){
        alert(this.name);
    };
    return this;
};
var ChildClass = $.extend(new SuperClass,function () {
    console.log(this);
    this.name = 'me';
    return this;
}());
                          

ChildClass.init();