Skip to content

Commit

Permalink
fix: tweak alert messages for cash register
Browse files Browse the repository at this point in the history
  • Loading branch information
scissorsneedfoodtoo committed Nov 16, 2023
1 parent c9ab057 commit 369c2ab
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions apps/cash-register/public/script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// Do not change code below this line
let price = 19.5;
let cid = [
['PENNY', 1.01],
['NICKEL', 2.05],
['DIME', 3.1],
['QUARTER', 4.25],
['ONE', 90],
['FIVE', 55],
['TEN', 20],
['TWENTY', 60],
['ONE HUNDRED', 100]
['PENNY', 0.5],
['NICKEL', 0],
['DIME', 0],
['QUARTER', 0],
['ONE', 0],
['FIVE', 0],
['TEN', 0],
['TWENTY', 0],
['ONE HUNDRED', 0]
];
// Do not change code above this line

Expand All @@ -28,14 +28,14 @@ const formatResults = (status, change) => {

const checkCashRegister = () => {
if (Number(cash.value) < price) {
alert('Customer does not have enough money to purchase item.');
alert('Customer does not have enough money to purchase the item');
cash.value = '';
return;
}

if (Number(cash.value) === price) {
displayChangeDue.innerHTML =
'No change due. Customer paid with exact cash.';
'No change due - customer paid with exact cash';
cash.value = '';
return;
}
Expand Down

0 comments on commit 369c2ab

Please sign in to comment.