Given intup data (transactions)
const transactions = [
['usd', 'buy', 10000],
['usd', 'sell', 5000],
['gbp', 'buy', 9000],
['eur', 'sell', 7000],
['uah', 'buy', 10000],
['usd', 'sell', 25000],
];Implement function thats return
const result = {
usd: [10000, 30000],
gbp: [9000, 0],
eur: [0, 7000],
uah: [10000, 0],
}