JSFiddle - React, Tailwind, and code Playground

by gschutz

JavaScript

var Tool = (function(){
    var Tool = function() {};
    
    Tool.prototype.create = function() {
        return "Criado";
    }
    
    return Tool;
});

var Wall = (function(){
    var Wall = function(options) {
        this.remove = function() {
            return "removido";
        }
    }
    Wall.prototype = Tool.apply(this);
    
    return new Wall();
});

var a = new Tool,
    b = Wall();

console.log(Wall(), Tool());
console.log(a instanceof Tool);

var Room = (function() {
    var Room = function(options) {
        
    }
    
    return new Room();
});