Skip to content

Instantly share code, notes, and snippets.

View AmigosKazz's full-sized avatar
:octocat:
I enjoy challenging myself

Kaznarah A. Ph AmigosKazz

:octocat:
I enjoy challenging myself
View GitHub Profile
@AmigosKazz
AmigosKazz / cash-register.js
Created August 15, 2023 16:47 — forked from JaymesKat/cash-register.js
Design a cash register drawer function checkCashRegister() that accepts purchase price as the first argument (price), payment as the second argument (cash), and cash-in-drawer (cid) as the third argument. cid is a 2D array listing available currency. The checkCashRegister() function should always return an object with a status key and a change k…
const CLOSED = "CLOSED";
const INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS";
const OPEN = "OPEN";
const PENNY = 0;
const NICKEL = 1;
const DIME = 2;
const QUARTER = 3;
const ONE = 4;
const FIVE = 5;