Last active
June 4, 2016 18:25
-
-
Save raphaklaus/b469f03088b89fde1ba29b90de675179 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 calculaIPI(produto){ | |
return produto.industrializado ? produto.total * 0.10 | |
: 0; | |
} | |
function calculaValorFinal(produto, callback){ | |
return produto.total + callback(produto); | |
} | |
var cadeiraExecutiva = { | |
total: 100, | |
industrializado: true | |
}; | |
calculaValorFinal(cadeiraExecutiva, calculaIPI); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment