What happens when you put a function inside a function?

A function which is defined inside another function is known as inner function or nested functio n. Nested functions are able to access variables of the enclosing scope . Inner functions are used so that they can be protected from everything happening outside the function. This process is also known as Encapsulation .

Sizin İçin Seçtik  How do you pass a Dart function?

Leave a Reply

Your email address will not be published. Required fields are marked *