JSFiddle - React, Tailwind, and code Playground

by poztin

JavaScript

var myModule = (function()
{
    var self = this,
    
    getMessage = function() {
        return 'Hello World';
    },
        
    doSomething = function() {
        alert(getMessage());                
    };    

    return {
        doSomething: doSomething        
    };

}());
    
myModule.doSomething();