Last active
December 20, 2017 02:30
-
-
Save jadehopepunk/4e78782acfae58589152923efc7892a0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 isValidOrder(order, customer) { | |
const salesTaxPercentage = 0.15 | |
return | |
order.units > 1 && | |
order.state == 'complete' && | |
order.price * (1.0 + salesTaxPercentage) < customer.availableBalance | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment