title: Uncaught TypeError: this.bad is not a function
body: <p>I get below exception when debugged on browser Console when i try to write the following Jquery Script :
  Here netPrice is 5.8333 and taxRate is 20.</p>
  
  <pre><code>var calculateGrossAmount = function(netPrice, taxRate) {
      if (!$.isNumeric(taxRate) || !$.isNumeric(netPrice)) {
          throw new TypeError("calculateGrossAmount: taxRate and netPrice
              must be numeric!");               
          }
          // vanilla js: (Math.round((netPrice * (1 + ((1/100) * taxRate))) * 100) / 100).toFixed(2);
          return new BigDecimal(netPrice)
              .multiply(new BigDecimal("1")
                  .add(new BigDecimal("1")
                      .divide(new BigDecimal("100"), new MathContext(100))
                      .multiply(new BigDecimal(taxRate), new MathContext(100))), new MathContext(100))
              .setScale(2, BigDecimal.prototype.ROUND_HALF_UP);
      }
  }
  </code></pre>
  
  <p>P.S I get error on return statement please help!!</p>