Project 2
This commit is contained in:
@@ -0,0 +1,22 @@
|
|||||||
|
const inventory = [];
|
||||||
|
const item3 = {
|
||||||
|
name: "computer",
|
||||||
|
model: "imac",
|
||||||
|
cost: 1000,
|
||||||
|
qty: 3
|
||||||
|
}
|
||||||
|
const item2 = {
|
||||||
|
name: "phone",
|
||||||
|
model: "android",
|
||||||
|
cost: 500,
|
||||||
|
qty: 11
|
||||||
|
}
|
||||||
|
const item1 = {
|
||||||
|
name: "tablet",
|
||||||
|
model: "ipad",
|
||||||
|
cost: 650,
|
||||||
|
qty: 1
|
||||||
|
}
|
||||||
|
inventory.push(item1, item2, item3);
|
||||||
|
console.log(inventory);
|
||||||
|
console.log(inventory[2].qty);
|
||||||
Reference in New Issue
Block a user