Skip to content

Commit e7b886e

Browse files
committed
added Quokka
1 parent 5e0b67b commit e7b886e

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎assignments/objects.js‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ let example = {
1818
}
1919

2020
// Write your intern objects here:
21-
function Intern(id, email, first, gender){
21+
function Intern(id, email, name, gender){
2222
this.id = id;
2323
this.email = email;
24-
this.first = first;
24+
this.name = name;
2525
this.gender = gender;
2626
}
2727

@@ -56,7 +56,7 @@ kennan.speak = function(){
5656
console.log(kennan.speak());
5757

5858
// Antonietta loves math, give her the ability to multiply two numbers together and return the product. Use the console.log provided as a hint.
59-
antonietta.multiplyNum = function(a,b){
59+
antonietta.multiplyNums = function(a,b){
6060
return a*b;
6161
}
6262
console.log(antonietta.multiplyNums(3,4));
@@ -74,10 +74,10 @@ let parent = {
7474
name: 'Susan',
7575
age: 70,
7676
child: {
77-
name: George,
77+
name: 'George',
7878
age:50,
7979
child:{
80-
name:Sam,
80+
name:"Sam",
8181
age:30,
8282
speak: function(){return "My Name is " + this.name;}
8383
},
@@ -89,11 +89,15 @@ let parent = {
8989
// Log the parent object's name
9090
console.log(parent.name);
9191
// Log the child's age
92+
console.log(parent.child.name);
9293

9394
// Log the name and age of the grandchild
95+
console.log(parent.child.child.name);
96+
console.log(parent.child.child.age);
9497

9598
// Have the parent speak
96-
99+
console.log(parent.speak());
97100
// Have the child speak
98-
101+
console.log(parent.child.speak());
99102
// Have the grandchild speak
103+
console.log(parent.child.child.speak());

0 commit comments

Comments
 (0)