title: How do I convert an integer to a float in JavaScript?
body: <p>I've got an <em>integer</em> (e.g. <strong>12</strong>), and I want to convert it to a <em>floating point number</em>, with a specified number of decimal places.</p>
  
  <p><strong>Draft</strong></p>
  
  <pre><code>function intToFloat(num, decimal) { [code goes here] }
  intToFloat(12, 1) // returns 12.0
  intToFloat(12, 2) // returns 12.00
  // and so on…
  </code></pre>