JSFiddle - React, Tailwind, and code Playground
JavaScript
var scope = {};
(function($) {
scope.o1 = {
init: function() { alert('1'); },
}
scope.o2 = {
init: function() { alert('2'); },
}
}(jQuery));
(function($) {
scope.o3 = {
init: function() { alert('3'); },
}
scope.o2.init();
}(jQuery));
scope.o1.init();
scope.o2.init();