to access function variable outside

midhun0003midhun0003 Member Posts: 15

contract sample1{
address public addr;
mapping (uint => address) public balances;
function createsample(uint i){

balances[uint(i)]=address(new sample());
}

}


when i try to access the variable (balances) in js ,it is always returning 0.
How to access the varaible (balances)outside the function?


Comments

Sign In or Register to comment.