Skip to content

Instantly share code, notes, and snippets.

@raphaklaus
Last active June 4, 2016 18:25
Show Gist options
  • Save raphaklaus/b469f03088b89fde1ba29b90de675179 to your computer and use it in GitHub Desktop.
Save raphaklaus/b469f03088b89fde1ba29b90de675179 to your computer and use it in GitHub Desktop.
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