Last active
August 16, 2017 20:47
-
-
Save ravinsinghd/6d3207ba51a07957872c060e11da4798 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
let counterLimit; | |
function setCounterLimit(){ | |
counterLimit=10; | |
} | |
function validateLimit(){ | |
if(currentValue>counterLimit){ | |
return false; | |
} | |
return true; | |
} | |
. | |
. | |
. | |
// 100 or 200 line after | |
function specialCaseValidate(){ | |
// i am setting the couterlimit to 20 for validate the special customer | |
counterLimit=20; | |
if (validateLimit()){ | |
// some logic | |
} | |
// resetting counter limit to old state | |
counterLimit=10; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment