Skip to content

Commit a8904ea

Browse files
committed
Added Challenge 3: Object methods - intern methods
1 parent a443465 commit a8904ea

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

‎assignments/objects.js‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ const internInfo2 =
3131
"name": "Kennan,M",
3232
"email": "kdiben1@tinypic.com",
3333
"gender": "M",
34+
"speak": function(){
35+
return `Hello, my name is ${internInfo2.name} `
36+
}
3437
};
3538
const internInfo3 =
3639
{
@@ -52,6 +55,9 @@ const internInfo5 =
5255
"name": "Antonietta,F",
5356
"email": "adaine5@samsung.com",
5457
"gender": "F",
58+
"multiplyNums": function(a,b){
59+
return a * b;
60+
}
5561
};
5662

5763
// ==== Challenge 2: Reading Object Data ====
@@ -67,12 +73,14 @@ console.log(internInfo3.email);
6773
console.log(internInfo4.name);
6874
// Antonietta's Gender
6975
console.log(internInfo5.gender);
76+
77+
7078
// ==== Challenge 3: Object Methods ====
7179
// Give Kennan the ability to say "Hello, my name is Kennan!" Use the console.log provided as a hint.
72-
// console.log(kennan.speak());
80+
console.log(internInfo2.speak());
7381

7482
// Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint.
75-
//console.log(antonietta.multiplyNums(3,4));
83+
console.log(internInfo5.multiplyNums(3,4));
7684

7785
// === Great work! === Head over to the the arrays.js file or take a look at the stretch challenge
7886

0 commit comments

Comments
 (0)