Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const HiMixin = Sup => class extends Sup {
- hi() {
- console.log("Hi!");
- }
- }
- const ByMixin = Sup => class extends Sup {
- by() {
- console.log("By!");
- }
- }
- class Person extends HiMixin(ByMixin(Object)) {}
- const p = new Person();
- p.hi();
- p.by();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement