JSFiddle - React, Tailwind, and code Playground

by Alexander

JavaScript

console.clear();

var o1, o2;

(function(g){

    function Public(){
    }
    
    function Private(s) {

        this.name = s;

        return new Public();
    }

    g.MyClass = Private;
})(window);

o1 = new MyClass('Cls-1');
o2 = new MyClass('Cls-2');