How to Convert a unit in ERC 20 contracts

Im using this function to get my Token Balance function balanceOf() { web3.eth.getAccounts(function (error, accounts) { contract.balanceOf(accounts[0], function(err, result) { if(err) { console.log(err, ‘err’); } else { document.getElementById(‘snet-holding’).innerHTML = result; } }); }); } The output of this code is 400000000 while it should be 4; With ether i have found this conversion but how…