JSFiddle - React, Tailwind, and code Playground

by Derek Anderson

JavaScript

var space = new (function(window, document, undefined){

    this.run = function(func){
        func();
        return _space;
    }

    var _space = this;
    return this;
} (window, document));

console.log(space);
space.run(function(){
   alert('hello world'); 
}).run(function(){
   alert('good bye world');
});