Skip to content

Anoesj/class-composition-experiment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What if we'd use class A extends B as a way to compose classes, instead of just using prototypal inheritance?

This experiment shows how to use classes for scenarios like this:

  • I need a Dog!
  • it's an Animal, so it can Breathe.
  • an Animal is an Entity, so it can Eat and Poop
  • this Dog can also Bark
  • and some types of Dogs can Hunt.

About

Just a simple ES2015 class “composition” experiment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors