minor
This commit is contained in:
parent
203b8f9f07
commit
3b14ed8185
1 changed files with 2 additions and 2 deletions
|
@ -69,14 +69,14 @@ class Animal {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Inherit from Animal by specifying "extends Animal"
|
||||||
*!*
|
*!*
|
||||||
// Inherit from Animal
|
|
||||||
class Rabbit extends Animal {
|
class Rabbit extends Animal {
|
||||||
|
*/!*
|
||||||
hide() {
|
hide() {
|
||||||
alert(`${this.name} hides!`);
|
alert(`${this.name} hides!`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/!*
|
|
||||||
|
|
||||||
let rabbit = new Rabbit("White Rabbit");
|
let rabbit = new Rabbit("White Rabbit");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue