Last active
August 22, 2023 23:40
-
-
Save mcsee/5c0218fcf1362228f406e463f79171a9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Animal { } | |
class Rabbit extends Animal { | |
move() { | |
console.log("I'm running"); | |
} | |
} | |
class Seagull extends Animal { | |
move() { | |
console.log("I'm flying"); | |
} | |
} | |
let bunny = new Rabbit(); | |
let livingstone = new Seagull(); | |
bunny.move(); | |
livingstone.move(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment