Simplifying big numbers using engineering numbers
<p>I am making a project, where im gonna have 6 different numbers, but i want all of them simplified. The problem is when i simplify numbers it takes about 100 lines. So making it 6 times, will give me 600 lines of code just for that.</p>

<pre><code>if (money &gt;= 1000 &amp;&amp; money &lt;= 999999){
    moneyshow = money/1000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" k $";
  }
  if (money &gt;= 1000000 &amp;&amp; money &lt;= 999999999){
    moneyshow = money/1000000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" m $";
  }
  if (money &gt;= 1000000000 &amp;&amp; money &lt;= 999999999999){
    moneyshow = money/1000000000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" b $";
  }
  if (money &gt;= 1000000000000 &amp;&amp; money &lt;= 999999999999999){
    moneyshow = money/1000000000000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" t $";
  }
  if (money &gt;= 1000000000000000 &amp;&amp; money &lt;= 999999999999999999){
    moneyshow = money/1000000000000000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" quad $";
  }
  if (money &gt;= 1000000000000000000 &amp;&amp; money &lt;= 999999999999999999999){
    moneyshow = money/1000000000000000000;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+" quint $";
  }
  if (money &gt;= 0 &amp;&amp; money &lt;= 999 || money &gt;= 1000000000000000000000) {
    moneyshow = money;
    document.getElementById("money").innerHTML = "Money: "+moneyshow.toFixed(2)+"$";
  }
</code></pre>

<p>Is there any way i could simplify that ? Also im gonna need it so i can use it on 6 or more numbers at once.</p>