-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdrawer.js
56 lines (54 loc) · 905 Bytes
/
drawer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
/**
* you can use this example drawer to do some debugging
*
* note that we usually represent money in integers not decimals:
* https://blog.agentrisk.com/you-better-work-in-cents-not-dollars-2edb52cdf308
*/
const drawer = [
{
name: "penny",
value: 1, // a penny is 1 cent
quantity: 72, // 72 pennies in the drawer
},
{
name: "nickel",
value: 5,
quantity: 41,
},
{
name: "dime",
value: 10,
quantity: 31,
},
{
name: "quarter",
value: 25,
quantity: 17,
},
{
name: "one", // n.b. a $1 bill is a note, not a coin
value: 100,
quantity: 90,
},
{
name: "five",
value: 500,
quantity: 11,
},
{
name: "ten",
value: 1_000,
quantity: 2,
},
{
name: "twenty",
value: 2_000,
quantity: 3,
},
{
name: "hundred",
value: 10_000,
quantity: 1,
},
];
module.exports = drawer;