📅  最后修改于: 2020-10-22 07:09:21             🧑  作者: Mango
在本章中,我们将了解Mixins作为Function的重要性。像函数一样,mixin可以嵌套,可以接受参数,也可以返回值。
下表详细说明了将mixin用作功能的方法。
Sr.No. | Mixins usage & Description |
---|---|
1 | Mixin scope
Mixins consist of variables; these can be used in caller’s scope and are visible. |
2 | Mixin and return values
Mixins are similar to functions and the variables that are defined in a mixin will behave as the return values. |
3 | Mixin inside another mixin
Whenever a mixin is defined inside another mixin, it can be used as return value too. |