Accessing multiple return values (a, b, c) from hardness function in web3js
I have a function that returns multiple values. I want to access them from Web3js.
function testReturnBet(uint index) constant returns (address player,
uint tokensPlaced,
uint8[4] numbers,
uint ratioIndex,
uint timestamp,
uint rollIndex,
uint winAmount) {
bet outBet = bets[index];
return (outBet.player,
outBet.tokensPlaced,
outBet.numbers,
outBet.ratioIndex,
outBet.timestamp,
outBet.rollIndex,
outBet.winAmount);
}
+3
source to share