create an object for two classes javascript code example
Example 1: mixin in javascript mdn
let calculatorMixin = Base => class extends Base {
calc() { }
};
let randomizerMixin = Base => class extends Base {
randomize() { }
};
Example 2: mixin in javascript mdn
class Foo { }
class Bar extends calculatorMixin(randomizerMixin(Foo)) { }