JSFiddle - React, Tailwind, and code Playground

by Andy You

JavaScript

Person = Ext.extend(Object, {
    constructor: function(first, last) {
        this.firstName = first;
        this.lastName = last
    },
    getName: function() {
        return this.firstName + ' ' + this.lastName;
    }
});

Developer = Ext.extend(Person, {
    getName: function() {
        if (this.isCoding) {
            return 'Go Away';
        } else {
            return Developer.superclass.getName.call(this);
        }
    }
});
var p = new Person('John', 'Smith');
alert('Hi' + p.getName() + "Welcome to learn ExtJS");