Skip to content

Instantly share code, notes, and snippets.

@aryak007
Last active March 26, 2018 20:30
Show Gist options
  • Save aryak007/c53704db87c206187303a949ca20f96a to your computer and use it in GitHub Desktop.
Save aryak007/c53704db87c206187303a949ca20f96a to your computer and use it in GitHub Desktop.
var outerFunction = (function(){
var publicInterface = {
inner : function(){
console.log("Inner function");
},
anotherInner: function(){
publicInterface.inner();
}
};
return publicInterface;
})();
outerFunction.anotherInner(); // It will print "Inner function"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment