Why does es6 need the decorator (Decorator) when it has extend inheriting the parent class?

RT,es6 has a parent class inherited by extend, so why do you want to decorate (Decorator),? isn"t it superfluous?

Oct.15,2021
The

decorator is just an additional function, and inheritance is to reuse existing functions. Why is it superfluous?

Menu