Skip to content

Commit 074f263

Browse files
author
Vaeliwen
committed
Completed object challenge bloominstituteoftechnology#2.
1 parent 8d936b7 commit 074f263

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

assignments/objects.js

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,35 +18,35 @@ const example = {
1818
}
1919

2020
// Write your intern objects here:
21-
const intern1 = {
21+
const mitzi = {
2222
"id": 1,
2323
"name": "Mitzi",
2424
"email": "[email protected]",
2525
"gender": "F"
2626
}
2727

28-
const intern2 = {
28+
const kennan = {
2929
"id": 2,
3030
"name": "Kennan",
3131
"email": "[email protected]",
3232
"gender": "M"
3333
}
3434

35-
const intern3 = {
35+
const keven = {
3636
"id": 3,
3737
"name": "Keven",
3838
"email": "[email protected]",
3939
"gender": "M"
4040
}
4141

42-
const intern4 = {
42+
const gannie = {
4343
"id": 4,
4444
"name": "Gannie",
4545
"email": "[email protected]",
4646
"gender": "M"
4747
}
4848

49-
const intern5 = {
49+
const antonietta = {
5050
"id": 5,
5151
"name": "Antonietta",
5252
"email": "[email protected]",
@@ -55,16 +55,30 @@ const intern5 = {
5555
// ==== Challenge 2: Reading Object Data ====
5656
// Once your objects are created, log out the following requests from HR into the console:
5757

58+
function fetch(stick) {
59+
return stick;
60+
}
61+
5862
// Mitzi's name
5963

64+
console.log("Mitzi's name:", fetch(mitzi["name"]))
65+
6066
// Kennan's ID
6167

68+
console.log("Kennan's ID:", fetch(kennan["id"]))
69+
6270
// Keven's email
6371

72+
console.log("Keven's email:", fetch(keven["email"]))
73+
6474
// Gannie's name
6575

76+
console.log("Gannie's name:", fetch(gannie["name"]))
77+
6678
// Antonietta's Gender
6779

80+
console.log("Antonietta's gender:", fetch(antonietta["gender"]))
81+
6882
// ==== Challenge 3: Object Methods ====
6983
// Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint.
7084
// console.log(kennan.speak());

0 commit comments

Comments
 (0)