total() - Wuntenn/acme-shopping-basket GitHub Wiki

total() method

The total() method returns the cost of all the items in the basket.

Errors

'Unfound product: ', currentItem, 'see wiki: https://github.com/Wuntenn/acme-shopping-basket/wiki/_new'

This means that one of the product codes added to the basket does not exit in the product details. To fix this make sure not to add products that haven't first been specified in the product details.