In this chapter let's study about Mixins as Functions. Mixins
and functions work very similarly. Like functions, the mixins can be
nested, can accept parameters and return values too.
The below table demonstrates the use of mixins as functions in details.
The below table demonstrates the use of mixins as functions in details.
S.N. | Mixins usage & Description |
---|---|
1 | Mixin scope Mixins consisting of variables and mixins 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 its return values. |
3 | Mixin inside another mixin Whenever a mixin is defined inside another mixin, it can be used as return value too. |
No comments:
Post a Comment