Skip to content

Instantly share code, notes, and snippets.

@codenamejason
Created March 29, 2018 17:18
Show Gist options
  • Save codenamejason/8d3804edf1cb6ea6a285cf4ea2b27ce1 to your computer and use it in GitHub Desktop.
Save codenamejason/8d3804edf1cb6ea6a285cf4ea2b27ce1 to your computer and use it in GitHub Desktop.
Anonymous Function
(function ($){
return {
property: 'myProperty',
method: function(){
return someShit;
},
property: 'myProperty2',
method: function(){
return someShit2;
}
}
})(JQuery);// Execute and return. You can also pass in object of your choice.
// Example would be to pass in JQuery
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment