Skip to content

Instantly share code, notes, and snippets.

@tiagomatosweb
Last active February 7, 2023 02:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save tiagomatosweb/0d581128be27b7998402f0acbeff1de0 to your computer and use it in GitHub Desktop.
Save tiagomatosweb/0d581128be27b7998402f0acbeff1de0 to your computer and use it in GitHub Desktop.
// Faça o calculo do total destes produtos que estão no carrinho
const cart = [
{
name: 'Pizza de calebreza',
amount: 10,
qty: 2,
addons: [
{
'name': 'Extra calabreza',
'amount': 1.5
},
{
'name': 'Borda recheada',
'amount': 7
},
],
},
{
name: 'Carne assada',
amount: 35,
qty: 1,
}
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment