Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var basket = [
- {item: 'garri', amount:500},
- {item: 'spagetti', amount:400},
- {item: 'torch', amount:300},
- {item: 'brush', amount:600}
- ]
- var tax = 550
- function actualAmount(basket){
- var itemlog = 0;
- for (index = 0 ; index < basket.length ; index++)
- {
- itemlog = itemlog + basket[index].amount
- }
- console.log(itemlog + tax);
- }
Add Comment
Please, Sign In to add comment