title: how to use toWei() function in web3.js for tokens having 2 decimals?
body: <p>I am trying to convert amount in wei using web3js function called toWei().</p>
  
  <p>Here is my code:</p>
  
  <pre><code>     var etherwithdrawamount1=web3Infura.utils.toWei(etherwithdrawamount, 'wei'); 
  </code></pre>
  
  <p>Now, the problem is that the token amount is not calculating correct, because the token has 2 decimals. </p>
  
  <p>In web3 documentation: <a href="https://web3js.readthedocs.io/en/1.0/web3-utils.html#towei" rel="nofollow noreferrer">https://web3js.readthedocs.io/en/1.0/web3-utils.html#towei</a>
  there is no places for 2 decimals.</p>
  
  <p>number - String|Number|BN: The value.</p>
  
  <p>unit - String (optional, defaults to "ether"): The ether to convert
     from.</p>
  
  <p>Possible units are : </p>
  
  <blockquote>
    <p>noether: ‘0’<br>
    wei: ‘1’<br>
    kwei: ‘1000’<br>
    Kwei: ‘1000’<br>
    babbage: ‘1000’<br>
    femtoether: ‘1000’<br>
    mwei: ‘1000000’<br>
    Mwei: ‘1000000’<br>
    lovelace: ‘1000000’<br>
    picoether: ‘1000000’<br>
    gwei: ‘1000000000’<br>
    Gwei: ‘1000000000’<br>
    shannon:‘1000000000’<br>
    nanoether: ‘1000000000’<br>
    nano: ‘1000000000’<br>
    szabo: ‘1000000000000’<br>
    microether: ‘1000000000000’<br>
    micro: ‘1000000000000’<br>
    finney: ‘1000000000000000’<br>
    milliether: ‘1000000000000000’<br>
    milli: ‘1000000000000000’<br>
    ether: ‘1000000000000000000’</p>
  </blockquote>
  
  <p>So, how to get correct value in toWei() where the token decimals are 2?</p>