JSFiddle - React, Tailwind, and code Playground

by Ignacio Fuentes

JavaScript

var outerfunc = function() {
    var a = "1";
    outerfunc.prototype.method = function() {
        alert(a);
    };
};
var test = new outerfunc();
test.method();