What are the variables/functions Anonimas and closures for? And what are they for? How to use?

Asked

Viewed 181 times

3

I think most of the question has already been asked in the title.

More specifically, I wanted real examples of using these techniques and the relationship between them.

Note: I read other related answers, but could not understand 100%.

  • This question is quite broad. I think it would be better if you focused the question on one of those examples that you said you didn’t understand 100%

  • 4

    Have you read this one (http://answall.com/q/1859/129) and this one (http://answall.com/q/9936/129)? If it is not yet clear you can specify which part we should reinforce?

1 answer

4


Functions Anonimas and closures are very distinct elements, but basically Anonimas functions are functions that have no name (it seems obvious) and this allows a huge ease in implementing callbacks

closures has to do with the range/scope of a variable, which is useful for solving the sending of parameters to event functions using functions that return a function.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.