Skip to content

Instantly share code, notes, and snippets.

@ericrrichards
Created November 13, 2012 14:47
Show Gist options
  • Select an option

  • Save ericrrichards/4066093 to your computer and use it in GitHub Desktop.

Select an option

Save ericrrichards/4066093 to your computer and use it in GitHub Desktop.
Options
function Foo( args ){
var a = 0;
var b = 0;
var c = 0;
var d = 0;
var e = 1;
if ( args['a'] ) a = args['a'];
if ( args['b'] ) b = args['b'];
if ( args['c'] ) c = args['c'];
if ( args['d'] ) d = args['d'];
if ( args['e'] ) e = args['e'];
return (a + b + c + d)/e;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment