Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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 )))
 
PREVIOUS NEXT
Tagged: #reduce #calculate #sum #react
ADD COMMENT
Topic
Name
2+2 =