I am trying to develop a function to calculate the total price in my shopping cart. I have made it so that the "cost" value will be the "price" value times the "quantity" value. I am now trying to grab the "cost" values from all the different cart items and add them together to get the total price for my cart. How should I do this; I am not sure of how to loop through the different items.

![Firestore Database](https://i.stack.imgur.com/ugdEJ.png)