There are 10 Ethereum accounts in Ganache. I work on a Truffle project. Whenever i run the following codes in Nodejs:
var Web3 = require('web3');
var web3 = new Web3("ws://localhost:8545");
var acc= Promise.resolve(web3.eth.getAccounts());
acc.then(function(ins){console.log(ins[0]);});
Address of the first account will be shown:
But i want to see that address in my browser. What is the appropriate code?