Skip to content

Instantly share code, notes, and snippets.

@abhiaiyer91
Created December 12, 2015 23:01
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 abhiaiyer91/1dc3c43442862ba90a3e to your computer and use it in GitHub Desktop.
Save abhiaiyer91/1dc3c43442862ba90a3e to your computer and use it in GitHub Desktop.
var psuedoReusableFunction = function (param1, param2, param3, param4) {
// do something with params 1 and 2
DoSomething(param1);
DoSomething(param2);
// params 3 and 4 were added when your app changed but you didn't
// want to rewrite anything
if (param3) {
DoSomethingElse(param3);
}
// ya da ya da ...
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment