title: Append extra zeroes to decimal to make 4.5 look 4.500 but 4.5234 should be 4.5234
body: <p>I have a value fetched from the database, it's like:</p>
  
  <pre><code>4.5   which should be 4.500
  0.01  which should be 0.010
  11    which should be 11.000
  </code></pre>
  
  <p>so I used this piece of code</p>
  
  <pre><code>sprintf("%.3f",(double)$html['camp_cpc'])
  </code></pre>
  
  <p>But here arised another problem. If <code>$html['camp_cpc'] = '4.5234'</code>, then also it displays <code>4.523</code> instead of original value <code>4.5234</code></p>
  
  <p>Also for other values with larger decimal like <code>0.346513</code>, its only showing up to <code>0.346</code>.</p>
  
  <p>How can I solve this problem in JavaScript also?</p>