Skip to content

Commit d78aeea

Browse files
committed
Completed problem 1 in constructors.js
1 parent 6913818 commit d78aeea

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎constructors.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ function Animal(options) {
99
}
1010

1111
// add 'grow' to Animal's prototype here
12+
Animal.prototype.grow = function() {
13+
console.log(`${this.name} grew larger!`);
14+
}
1215

1316
// problem #2
1417
// setup Cat to inherit from Animal

0 commit comments

Comments
 (0)