How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?
JavaScript kapanışlarını, oluşturdukları kavramları bilen (örneğin fonksiyonlar, değişkenler ve benzeri) bilgisi olan birisine nasıl açıklarsınız, ancak kapanmaların kendileri anlamıyor mu?
Originally the question was asking to "explain JavaScript closures to a 5yr old"; my response was the only one that even attempted to do that.
Asıl soru şu soruyu soruyordu: "5 yıl öncesine ait JavaScript kapanışlarını açıklamak"; Benim yanıtım bile bunu yapmaya çalışan tek kişiydi.
Originally the question was asking to "explain JavaScript closures to a 5yr old"; my response was the only one that even attempted to do that.
Asıl soru, "JavaScript'in 5 yaşından eskilere açıklanması"; Cevabım, bunu yapmaya çalışan tek kişiydi.
This describes the common mistake with using closures in JavaScript.
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.