I’m building a split expenses app and right now it is at the basic level where I’m just trying to get the MVP running before scaling it.
I’ve hit dead end after running
splitExpenses function. So basically I have an array of objects with a key called
I want to extract the the objects which contains the highest and lowest
outstandingAmount amount value and save them in
The problem is that these 2 variable are storing the same object when ideally
highestObj should save object with
outstandingAmount value as 135 and other with -135. And I can’t figure out why so I need your help here.
Thanks in advance guys.