Skip to content

Instantly share code, notes, and snippets.

@pbojinov
Last active December 17, 2015 22:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pbojinov/5686363 to your computer and use it in GitHub Desktop.
Save pbojinov/5686363 to your computer and use it in GitHub Desktop.
Self executing function (class) with some exposed public function
/**
* If class Petar does not already exist, create a new instance of it
*/
window.Petar = window.Petar || {};
Petar.Music = function() {
var innerContent;
function init() {
innerContent = '';
};
return {
init: init
}
}();
Petar.Music.init();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment