Quantcast
Channel: Active questions tagged youtube-api - Stack Overflow
Viewing all articles
Browse latest Browse all 3831

After map in react JS I have two columns one is debit and other one is credit is it possible to find total after calculate

$
0
0

`

 {users.map((user, index) => {              return (<tr key={index}><td>{index + 1}</td><td>{moment(user.date).format("MMM Do YYYY")}</td><td>{user.description}</td>>! first is debit and second is credit <td>{user.type === 1 ? <td>{user.amount}</td> : null}</td><td> {user.type === 2 ? <td>{user.amount}</td> : null}</td></tr>              );            })}

`

I am trying to find total after calculate my amount is in debit or credit


Viewing all articles
Browse latest Browse all 3831

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>