From aea4270aed12444cc21e2f8897ea673c5f2cba74 Mon Sep 17 00:00:00 2001 From: barbarof Date: Wed, 2 Oct 2019 19:55:19 -0500 Subject: [PATCH 1/9] solve a ob --- assignments/objects.js | 60 ++++++++++++++++++++++++++++++++++++++---- 1 file changed, 55 insertions(+), 5 deletions(-) diff --git a/assignments/objects.js b/assignments/objects.js index 40baf8d36..46831fd4e 100644 --- a/assignments/objects.js +++ b/assignments/objects.js @@ -17,22 +17,72 @@ const example = { "gender": "F" } + // Write your intern objects here: +const people={ + id: 1, + name:"Mitzi", + email:"mmelloy0@psu.edu", + gender:"f" + +}; + +const people1={ + id: 2, + name:"Kennan", + email:"kdiben1@tinypic.com", + gender:"M" + +}; + +const people2={ + id: 3, + name:"Keven", + email:"kmummery2@wikimedia.org", + gender:"m" + +}; + +const people3={ + id: 4, + name:"Gannie", + email:"gmartinson3@illinois.edu", + gender:"m" + +}; + +const people4={ + id: 5, + name:"Antonietta", + email:"adaine5@samsung.com", + gender:"f" + this.greeting = function sayHello(){ + return "Hello, my name is Kennan!" ; + + } +}; +greeting(); + // ==== Challenge 2: Reading Object Data ==== // Once your objects are created, log out the following requests from HR into the console: - + // Mitzi's name + console.log(people.name); + // Kennan's ID - -// Keven's email + console.log(people1.id); +// Keven's email0 +console.log(people2.email); // Gannie's name - +console.log(people3.name); // Antonietta's Gender - +console.log(people4.gender); + + // ==== Challenge 3: Object Methods ==== // Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint. // console.log(kennan.speak()); From e70937456c4b06a6ff80c66260d066b50e2593ac Mon Sep 17 00:00:00 2001 From: barbarof Date: Thu, 3 Oct 2019 00:18:58 -0500 Subject: [PATCH 2/9] challege 123 --- assignments/arrays.js | 31 ++++++++++++++++++++++++++----- assignments/objects.js | 29 ++++++++++++++++++++--------- 2 files changed, 46 insertions(+), 14 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index 0b5ecad74..3fabdf9f9 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -63,31 +63,52 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // ==== Challenge 1 ==== // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: -console.log(`Car 33 is a *car year goes here* *car make goes here* *car model goes here*` ); +for(let i=0; i Date: Thu, 3 Oct 2019 14:33:19 -0500 Subject: [PATCH 3/9] objet done --- assignments/objects.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/assignments/objects.js b/assignments/objects.js index 2cf73818b..85b7c3472 100644 --- a/assignments/objects.js +++ b/assignments/objects.js @@ -93,10 +93,10 @@ console.log(people4.multiply(3,4)); // ==== Challenge 3: Object Methods ==== // Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint. -// console.log(kennan.speak()); +console.log(kennan.speak()); // Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint. -//console.log(antonietta.multiplyNums(3,4)); +console.log(antonietta.multiplyNums(3,4)); // === Great work! === Head over to the the arrays.js file or take a look at the stretch challenge From 99771167096e4673ee4958a3720615b098f564ca Mon Sep 17 00:00:00 2001 From: barbarof Date: Thu, 3 Oct 2019 14:50:59 -0500 Subject: [PATCH 4/9] finish 1,2 challege --- assignments/arrays.js | 19 +++++-------------- assignments/objects.js | 2 +- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index 3fabdf9f9..539618cd4 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -64,14 +64,14 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // ==== Challenge 1 ==== // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: for(let i=0; i Date: Thu, 3 Oct 2019 14:53:42 -0500 Subject: [PATCH 5/9] update --- assignments/arrays.js | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index 539618cd4..7da2a6bd0 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -65,38 +65,26 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: for(let i=0; i Date: Thu, 3 Oct 2019 15:08:36 -0500 Subject: [PATCH 6/9] update array --- assignments/arrays.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index 7da2a6bd0..2fbd11b25 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -63,8 +63,8 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // ==== Challenge 1 ==== // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: -for(let i=0; i Date: Thu, 3 Oct 2019 15:34:14 -0500 Subject: [PATCH 7/9] update --- assignments/arrays.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index 2fbd11b25..b9593f0a2 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -60,11 +60,12 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // for (let i = 0; i < arr.length; i++) { // arr[i]; // 1,2,3,4 // } - // ==== Challenge 1 ==== // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: + for (let i=0; i Date: Thu, 3 Oct 2019 20:29:25 -0500 Subject: [PATCH 8/9] challege 5 update --- assignments/arrays.js | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index b9593f0a2..b22067024 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -63,8 +63,9 @@ let inventory = [{"id":1,"car_make":"Lincoln","car_model":"Navigator","car_year" // ==== Challenge 1 ==== // The dealer can't recall the information for a car with an id of 33 on his lot. Help the dealer find out which car has an id of 33 by logging the car's year, make, and model in the console log provided to you below: for (let i=0; i Date: Mon, 7 Oct 2019 16:01:26 -0500 Subject: [PATCH 9/9] update array --- assignments/arrays.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/assignments/arrays.js b/assignments/arrays.js index b22067024..05ca96321 100644 --- a/assignments/arrays.js +++ b/assignments/arrays.js @@ -101,8 +101,14 @@ console.log(oldCars); // ==== Challenge 6 ==== // A buyer is interested in seeing only BMW and Audi cars within the inventory. Return an array that only contains BMW and Audi cars. Once you have populated the BMWAndAudi array, use JSON.stringify() to show the results of the array in the console. let BMWAndAudi = []; + for (let i=0; i