Complete the function
// returns the sum of values using reduce with a typed accumulator
function sumValues(items: { v: number }[]): number {
return items.reduce((acc, item) => acc + item.____, 0);
}
// sumValues([{v:1},{v:2}]) -> 3
Answer: v
Each item exposes its number on the property named v.
Play Problem Solving ▸