Question from the Javascript - Fundamentals test

Archived

What does the following code do?

    const shopping = [
            { type: "pasta", price: 0.90 }, 
            { type: "pesto", price: 1.10 },
            { type: ''gruyere", price: 3.25 },]; 
   const budget = shopping.reduce(function(acc, cur) { return acc + cur.prix; }, 0); 
Author: KahinaStatus: Archived(New question!)Question passed 19 times
-1
Community EvaluationsNo one has reviewed this question yet, be the first!