Created
December 12, 2015 23:01
-
-
Save abhiaiyer91/1dc3c43442862ba90a3e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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