Skip to content

Instantly share code, notes, and snippets.

View kashyapmanu's full-sized avatar

Manukashyap.U.V kashyapmanu

View GitHub Profile
@kashyapmanu
kashyapmanu / cash-register.js
Created December 29, 2021 10:03 — 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;