Skip to content

Instantly share code, notes, and snippets.

@zackexplosion
Created September 11, 2015 07:11
Show Gist options
  • Select an option

  • Save zackexplosion/576dc62e1e6de522ea86 to your computer and use it in GitHub Desktop.

Select an option

Save zackexplosion/576dc62e1e6de522ea86 to your computer and use it in GitHub Desktop.
Sample javascript object params
var init = function(options){
if(typeof options !== 'object'){
options = {};
}
options.a = options.a || '';
options.b = options.b || '';
options.c = options.c || '';
}
var my_init = new Init({
a: 'hello',
b: '123',
c: 'yessssssss'
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment