I would like to explain my problem of the day.
currently i map, everything works correctly
my problem and that I wish I could create a div in it in order to display the result of total , unfortunately I can't
Do you have an idea of how to fix this?
{this.props.items.map(item => {
const product = this.props.items;
let total = 0;
console.log(total)
console.log('yolo',product)
console.log('yolo array',product[0].quantity)
for (let i = 0 ; i<product.length;i++){
console.log('products',product[i].quantity)
total = total + product[i].quantity;
}
}
)}