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.price; }, 0); 
Author: ErwanStatus: Archived(New question!)(Update)Question passed 53 times
-1
Community EvaluationsNo one has reviewed this question yet, be the first!