Incrementing total cost after grabbing price and quantity from an array of hashes and multiplying them

后端 未结 0 1027
轻奢々
轻奢々 2021-01-24 04:30

So, I have a shopping list

shopping_list = [{
  item: "notebook",
  quantity: rand(1..10),
  price_per_unit: rand(850..1500)
}, {
  item: "pen"         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题