diff --git a/03_05/script.js b/03_05/script.js index 84bf41d4..e6797b21 100755 --- a/03_05/script.js +++ b/03_05/script.js @@ -20,3 +20,9 @@ const backpack = { this.strapLength.right = lengthRight; }, }; + +console.log(backpack); +console.log("The pocketNum:", backpack.pocketNum); + +var query = "pocketNum"; +console.log("The pocketNum:", backpack[query]); \ No newline at end of file diff --git a/03_08/script.js b/03_08/script.js index e38d752d..4f3a0138 100755 --- a/03_08/script.js +++ b/03_08/script.js @@ -19,6 +19,7 @@ const backpack = { this.strapLength.left = lengthLeft; this.strapLength.right = lengthRight; }, + }; console.log("The backpack object:", backpack); diff --git a/03_10/script.js b/03_10/script.js index d08043d0..2f8a9a36 100755 --- a/03_10/script.js +++ b/03_10/script.js @@ -14,5 +14,6 @@ const everydayPack = new Backpack( false ); + console.log("The everydayPack object:", everydayPack); console.log("The pocketNum value:", everydayPack.pocketNum); diff --git a/03_13e/script.js b/03_13e/script.js index e4903913..9a8975c8 100755 --- a/03_13e/script.js +++ b/03_13e/script.js @@ -19,3 +19,5 @@ const everydayPack = new Backpack( console.log("The everydayPack object:", everydayPack); console.log("The pocketNum value:", everydayPack.pocketNum); console.log("Days since aquired:", everydayPack.backpackAge()); + + diff --git a/Practice/03_07/script.js b/Practice/03_07/script.js index 9a82c281..98a19789 100755 --- a/Practice/03_07/script.js +++ b/Practice/03_07/script.js @@ -7,3 +7,21 @@ * - Find an object that has another object inside of it to create a nested object. * - Test your objects in the browser console by accessing the entire object and its specific properties. */ + +const house = { + year: "1973", + make: "Duplex", + color: "Cream", + model: { + Side1: "two bedroom two bath", + Side2: "One bedroom one bath" + }, + houseOpen: false, + newModel: function( Right, left) { + this.model.Side1 = Right; + this.model.Side2 = left; + }, + +}; + +console.log (house.newModel); \ No newline at end of file diff --git a/Practice/03_09/script.js b/Practice/03_09/script.js index 1dd07f08..a37c21dc 100755 --- a/Practice/03_09/script.js +++ b/Practice/03_09/script.js @@ -9,7 +9,7 @@ const backpack = { name: "Everyday Backpack", - volume: 30, + volume: high, color: "grey", pocketNum: 15, strapLength: { @@ -23,4 +23,15 @@ const backpack = { this.strapLength.left = lengthLeft; this.strapLength.right = lengthRight; }, + newVolume: function( kyte) { + this.volume.high = kyte; + }, + newPocketNum: function (pocket) { + this.pocketNum = pocket; + }, + }; + +backpack.newVolume(40) + +console.log( backpack.newVolume); \ No newline at end of file diff --git a/Practice/03_12/script.js b/Practice/03_12/script.js index 9bcfa1f4..62ffbb44 100755 --- a/Practice/03_12/script.js +++ b/Practice/03_12/script.js @@ -6,3 +6,15 @@ * - Create several objects using the class. * - Test the objecs by calling their properties and using their methods in the console. */ + +import Backpack from "../../03_12/Backpack"; + +const everydayPack = Backpack( + "Mikey", + 24, + "black", + 12, + 15, + 15, + "true" +);