number does not have constructor

This commit is contained in:
tparnell
2018-12-10 16:54:10 -05:00
parent 02807a4b70
commit 26358cdc92

View File

@@ -23,7 +23,7 @@ function totalAmount(billTotal, selectedPer, numPpl) {
let totalAmount = tipAmount + billTotal;
//Does the OCD calculations by rounding the total bill amount up to make a whole number. Then taking that number and subtracting it from the total bill, which gives you a new tip amount that makes the bill total to be a whole number.
let ocdTotalAmount = Math.ceil(totalAmount);
let newTip = new Number((ocdTotalAmount - billTotal).toFixed(2));
let newTip = Number((ocdTotalAmount - billTotal).toFixed(2));
let billInfo = {
prevBillTotal: billTotal,