From cf8f5a5926b31905d189cacbe2cbfe989d76ff3f Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Tue, 5 Oct 2021 15:01:01 -0500 Subject: [PATCH 1/5] backup first object --- leonids-toys.js | 0 scripts/leonids-toys.js | 11 +++++++++++ 2 files changed, 11 insertions(+) delete mode 100644 leonids-toys.js create mode 100644 scripts/leonids-toys.js diff --git a/leonids-toys.js b/leonids-toys.js deleted file mode 100644 index e69de29..0000000 diff --git a/scripts/leonids-toys.js b/scripts/leonids-toys.js new file mode 100644 index 0000000..c360851 --- /dev/null +++ b/scripts/leonids-toys.js @@ -0,0 +1,11 @@ +const buildingBlocks = { + id: 1 + name: "building blocks", + type: "construction toy", + price: `${10.00}`, + stock status: true, + item description: "High quality elm wood blocks perfect kids 2-5 years old to help develop motor skills and to develop creativity!", + manufacturer: "Hasboro" + +} + -- 2.47.3 From 572be9f8b18ea24c4f6db6b11e88956bfcc8578b Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Wed, 6 Oct 2021 09:54:55 -0500 Subject: [PATCH 2/5] Completed initial toy objects --- scripts/leonids-toys.js | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/scripts/leonids-toys.js b/scripts/leonids-toys.js index c360851..0993a26 100644 --- a/scripts/leonids-toys.js +++ b/scripts/leonids-toys.js @@ -1,11 +1,18 @@ -const buildingBlocks = { - id: 1 - name: "building blocks", - type: "construction toy", - price: `${10.00}`, - stock status: true, - item description: "High quality elm wood blocks perfect kids 2-5 years old to help develop motor skills and to develop creativity!", - manufacturer: "Hasboro" - +const createtoyobj = (number,toyname, typename, unitprice, stockst,description,toyman ) => { + return { + id: number, + name: toyname, + type: typename, + price: unitprice, + stockstatus: stockst, + itemdescription: description, + manufacturer: toyman + + } + } + +const buildingBlocks = createtoyobj(1, "building blocks", "construction toy", `${50.00}`,true,"Quality building blocks for inquiring and creative minds", "Hasboro"); +const hotWheels = createtoyobj(2,"hot wheels set", "toy vehicles",`${100.00}`, true, "Beautifully painted model cars! Durable and will keep children entertained for hours. (Not for children under the age of 5, small parts/swallowing hazard", "Mattel"); +const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Beanie Babies"); -- 2.47.3 From 93b76c6d649527242004d167319bde10aa70e416 Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Wed, 6 Oct 2021 10:02:04 -0500 Subject: [PATCH 3/5] print log message --- scripts/leonids-toys.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/leonids-toys.js b/scripts/leonids-toys.js index 0993a26..44ff451 100644 --- a/scripts/leonids-toys.js +++ b/scripts/leonids-toys.js @@ -16,3 +16,7 @@ const createtoyobj = (number,toyname, typename, unitprice, stockst,description,t const buildingBlocks = createtoyobj(1, "building blocks", "construction toy", `${50.00}`,true,"Quality building blocks for inquiring and creative minds", "Hasboro"); const hotWheels = createtoyobj(2,"hot wheels set", "toy vehicles",`${100.00}`, true, "Beautifully painted model cars! Durable and will keep children entertained for hours. (Not for children under the age of 5, small parts/swallowing hazard", "Mattel"); const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Beanie Babies"); + +console.log(buildingBlocks); +console.log(hotWheels); +console.log(stuffedAnimals); \ No newline at end of file -- 2.47.3 From ed1ef897c045e672da4b93497559c83dd1cfc288 Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Wed, 6 Oct 2021 10:07:03 -0500 Subject: [PATCH 4/5] fixed obj 3 manufacturer property --- scripts/leonids-toys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/leonids-toys.js b/scripts/leonids-toys.js index 44ff451..cd01f3f 100644 --- a/scripts/leonids-toys.js +++ b/scripts/leonids-toys.js @@ -15,7 +15,7 @@ const createtoyobj = (number,toyname, typename, unitprice, stockst,description,t const buildingBlocks = createtoyobj(1, "building blocks", "construction toy", `${50.00}`,true,"Quality building blocks for inquiring and creative minds", "Hasboro"); const hotWheels = createtoyobj(2,"hot wheels set", "toy vehicles",`${100.00}`, true, "Beautifully painted model cars! Durable and will keep children entertained for hours. (Not for children under the age of 5, small parts/swallowing hazard", "Mattel"); -const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Beanie Babies"); +const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Soft, plushy, and cute! Perfect for infants all the way up to 7 years old!", Beanie Babies"); console.log(buildingBlocks); console.log(hotWheels); -- 2.47.3 From 65fb9ce6c2fedd2bfb4d137f5bc076a545e6b338 Mon Sep 17 00:00:00 2001 From: bytesparallel Date: Wed, 6 Oct 2021 10:07:53 -0500 Subject: [PATCH 5/5] fixed obj 3 manufacturer property --- scripts/leonids-toys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/leonids-toys.js b/scripts/leonids-toys.js index cd01f3f..0d4e5c0 100644 --- a/scripts/leonids-toys.js +++ b/scripts/leonids-toys.js @@ -15,7 +15,7 @@ const createtoyobj = (number,toyname, typename, unitprice, stockst,description,t const buildingBlocks = createtoyobj(1, "building blocks", "construction toy", `${50.00}`,true,"Quality building blocks for inquiring and creative minds", "Hasboro"); const hotWheels = createtoyobj(2,"hot wheels set", "toy vehicles",`${100.00}`, true, "Beautifully painted model cars! Durable and will keep children entertained for hours. (Not for children under the age of 5, small parts/swallowing hazard", "Mattel"); -const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Soft, plushy, and cute! Perfect for infants all the way up to 7 years old!", Beanie Babies"); +const stuffedAnimals = createtoyobj(3,"Beanie Babies", "Stuffed Animals", `${15.00}`, false, "Soft, plushy, and cute! Perfect for infants all the way up to 7 years old!", "Beanie Babies"); console.log(buildingBlocks); console.log(hotWheels); -- 2.47.3