Posts by Franciele Cristine • 31 points
2 posts
-
1
votes3
answers392
viewsQ: How to use reduce in an object array in React
import React from 'react'; const App = () => { const fruits = [ { name: "banana", cor: "yellow", price: 2 }, { name: "cherry", cor: "red", price: 3 }, { name: "strawberry", cor: "red", price: 4…
-
1
votes1
answer62
viewsQ: How to take the values of the property of an object created with a constructor function and group in an array?
I have these two construction functions that should create three passengers and a wagon and I need to create a method that when a passenger is added to the wagon he adds his name to the Passenger…