title: How to convert binary fraction to decimal
body: <p>Javascript has the function <code>parseInt()</code> which can help convert integer in a binary form into its decimal equivalent:</p>
  
  <pre><code>parseInt("101", 2) // 5
  </code></pre>
  
  <p>However, I need to convert binary fraction to its decimal equivalent, like:</p>
  
  <pre><code>0.101 = 0.625
  </code></pre>
  
  <p>I can write my own function that would calculate the result like the following:</p>
  
  <pre><code>1 * Math.pow(2, -1) + 0*Math.pow(2, -2) + 1*Math.pow(2, -3) // 0.625
  </code></pre>
  
  <p>But I'm wondering whether there is anything standard already.</p>