-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplayground.js
More file actions
28 lines (18 loc) · 726 Bytes
/
Copy pathplayground.js
File metadata and controls
28 lines (18 loc) · 726 Bytes
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
let GroceryList = require('./grocery-list');
process.on('unhandledRejection', r => console.log(r));
// Import the GroceryListTest class
// const GroceryListItem = require('./grocery-list-item');
// Tillåtna kategorier [Not in use]
let itemCategories = ["Elektronik","Hygien","Kläder","Mat","Övrigt"];
let a = new GroceryList('Första Listan');
let newItems = [
{ name: 'Öl', qt: 2, cat: 'Stuff' },
{ name: 'Saft', qt: 1, cat: 'Mat' },
{ name: 'Abba', qt: 20, cat: 'Musik' },
{ name: 'Saab', qt: 1, cat: 'Bil' }
];
newItems.map((item) => a.addItem(item.name, item.qt, item.cat));
a.addItem('Plommon', 120, 'Mat');
a.addItem('Väska', 120, 'Stuff');
a.addItem('Lingon', 120, 'Mat');
console.log(a);