Answers for "reduce to calculate sum react"

0

reduce to calculate sum react

const data = [
  {title : "One",prix:100},
  {title : "Two",prix:200},
  {title : "Three",prix:300}
]

console.log((data.reduce((a,v) =>  a = a + v.prix , 0 )))
Posted by: Guest on September-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language