-
-
Save himeshvats19/3ef51b3f15e118ed76bf9b3b7416f0d4 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
function calculateTotalAmount (vip) { | |
var amount = 0 | |
if (vip) { | |
var amount = 1 | |
} | |
{ // more crazy blocks! | |
var amount = 100 | |
{ | |
var amount = 1000 | |
} | |
} | |
return amount | |
} | |
console.log(calculateTotalAmount(true)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment