title: Round up the values in my calculator script & add commas separator for the value
body: <p>I have the problem. My JS knowledge &amp; experience is very poor so I can't solve it without your help. I have the following code for my simple calculator and I want to add some code for this:</p>
  
  <p>If I enter a number such as 10010 into the calculator, I get $7.508 back. How can I make it so that there are always 2 digits past the period and round it up? In this case, it would be best if it showed $7.51 instead of $7.508. If I entered 4,000 it shows "$3" but can it say "$3.00"? 
  Thank you in advance!</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input placeholder="How many likes?" style="height: 50px;width: 360px;color: #222;border-radius: 5px;border: 1px #85c9e3 solid;font-size: 18px;" type="text" id="likecount" /&gt;
  &lt;p style="font-family: 'Montserrat', sans-serif; padding: 20px 0px; font-weight: bold; color: #222; "&gt;Pricing: &lt;b&gt;&lt;span style="color: #004f04;"&gt; $&lt;/span&gt;&lt;span id="output" style="color: #004f04;"&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
  
  &lt;script type="text/javascript"&gt;function priceCalculation(a){
      if(a &lt;= 10000){
          return 0.00099;
      }else if(a &gt;= 10001 &amp;&amp; a &lt;= 25000 ){
          return 0.00095;
      }else if(a &gt;= 25001 &amp;&amp; a &lt;= 50000 ){
          return 0.00089;
      }else if(a &gt;= 50001 &amp;&amp; a &lt;= 100000 ){
          return 0.00075;
      }else{
          return 0.00075;
      }
  }
  
  // number format set to en-US e.g (from 1500 to 1,500)
  var numFormat = new Intl.NumberFormat("en-US");
  
  $('#likecount').keyup(function(e){
      // if a '.' is pressed
   if($(this).val().endsWith('.')) {
       return;
      }
  
      // if input value is empty then assign '0' else the original value
      var inputVal = $(this).val() === ''?'0':$(this).val();
    
      inputVal = parseFloat(inputVal.replace(/[$|,]/g, ''));
      var price = priceCalculation($(this).val());
      var total = inputVal * price;
      var formatted = numFormat.format(inputVal) // set format to input
      $(this).val(formatted); // display the formatted input back
      $('#output').text(numFormat.format(total)); // display the total price
  });
  
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>