From 26358cdc9230087d2e13926b9e05f4f01e3dd1c6 Mon Sep 17 00:00:00 2001 From: tparnell Date: Mon, 10 Dec 2018 16:54:10 -0500 Subject: [PATCH] number does not have constructor --- Tip Calculator ocd JS/calculator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tip Calculator ocd JS/calculator.js b/Tip Calculator ocd JS/calculator.js index 9024033..6d45e88 100644 --- a/Tip Calculator ocd JS/calculator.js +++ b/Tip Calculator ocd JS/calculator.js @@ -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,