Skip to content

Commit dc8172f

Browse files
committed
Completed part 2 of class.js
1 parent 5d0fc5c commit dc8172f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎src/class.js‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,16 @@ class Animal {
4141
}
4242
}
4343

44+
class Cat extends Animal {
45+
constructor(options) {
46+
super(options);
47+
this.name = options.name;
48+
}
49+
50+
meow() {
51+
return `${this.name} meowed!`;
52+
}
53+
}
4454

4555
/* eslint-disable no-undef */
4656

0 commit comments

Comments
 (0)