scope functions's sole purpose is to execute a block of code within the context of an object. When you call such a function on an object with a lambda expression provided, it forms a temporary scope.
In this scope, we can access the object without its name. Such functions are called scope functions. There are five of :-
1.let -> it
2. also -> it
3.with -> this
4. apply -> this
5. run -> this
No comments:
Post a Comment