How to print uint array in Truffle's Java script environment?
Hi,
I am following the link: Printing uint256 value to console while debugging with Truffle
I am working on truffle console environment which uses javascript code. I want to print the return value of an uint array as returned by the following Solidity code:
pragma solidity ^0.5.0;
// Creating a contract
contract Typespop {
// Defining an array
uint[] data
= [10, 20, 30, 40, 50];
// Defining a function to
// pop values from the array
function array_pop(
) public returns(uint[] memory){
data.pop();
return data;
}
}
I have tried the following:
truffle(development)> (await vic.array_pop()).toString() '[object Object]' truffle(development)>
Somebody please guide me. @Phạm Huy Phát, please guide me.
Zulfi.