I am giving following commands at Truffle console but I am getting "undefined" message:
> $ truffle console
>
> You can improve web3's peformance when running Node.js versions older
> than 10.5.0 by installing the (deprecated) scrypt package in your
> project
>
> truffle(ganache)> let accounts =await web3.eth.getAccounts()
>
> undefined
Truffle version is:
> truffle(ganache)> truffle version
>
> Truffle v5.1.27 (core: 5.1.27)
>
> Solidity v0.5.16 (solc-js) Node v8.10.0 Web3.js v1.2.1
>
> truffle(ganache)>
Somebody please guide me.
Zulfi.
undefined
printed in the console is from the use oflet
. If you examine the variableaccounts
it was correctly assigned. For example typelet a = 22
and it will printundefined
. – Ismael Jun 14 '20 at 15:49