Last active
July 6, 2020 01:26
-
-
Save Sarav-S/355a985b7914336a67829f2249651be9 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
// Traditional Javascript | |
function total(tax) { | |
return function(subtotal) { | |
return subtotal + ((subtotal \* tax)/100); | |
} | |
} | |
// ES6 | |
const total = tax => subtotal => subtotal + ((subtotal * tax)/100); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment