JSFiddle - React, Tailwind, and code Playground

JavaScript

var App = (function(fw) {
    var somevar1 = "hello";
    var somevar2 = "world";
    this.get = function(what) {
        return eval(what);
    }
});

var app = new App({some: "thing"});

// now for the use:
console.log(app.get("somevar1"));