This example assigns the unnamed and anonymous function to the variable foo.
If that change is made, then each anonymous function in the array result has its own closure; when the example is run the output is as follows
Bu değişiklik yapılırsa, result dizisindeki her isimsiz fonksiyon kendi kapanmasına sahiptir; örnek çalıştırıldığında çıktı aşağıdaki gibidir
Since inside the inner anonymous function i2 is not a local, this creates a closure.
Internally, the anonymous function that you wrote will be called and its result will be enclosed in a Future.
İçeride ise, yazmış olduğunuz anonim fonksiyon çağrılarak sonucu bir Future içinde saklanacaktır.
The function expression is often called an "anonymous function", because it does not have to have a name,
İşlev ifadesi genellikle "anonim işlev" olarak adlandırılır, çünkü bir adı olması gerekmez.
The second common form is called an anonymous function expression
The anonymous function is declared first; and when that function is called it can access the alice variable because alice is in the closure.
Anonim işlev önce bildirilir; ve bu fonksiyon çağrıldığında alice değişken çünkü alice aynı kapsamda (JavaScript yapar değişken kaldırma).
The anonymous function can reference text which holds the value 'Hello Bob' because the local variables of sayHello2() have been secretly kept alive in a closure.
Anonim işlev referans olabilir text değeri tutan 'Hello Bob' çünkü yerel değişkenler sayHello2() bir kapatma içinde tutulur.
Arrow Function Expression (ES2015+) (which, like anonymous function expressions, don't involve an explicit name, and yet can create functions with names)
Ok İşlev İfadesi (ES2015 +) (Bu, anonim işlev ifadeleri gibi, açık bir ad içermez ve adlarıyla işlevler oluşturabilir)
Since the anonymous function is executed immediately, the i value is different for each function defined inside the anonymous function.
Anonim işlev hemen yürütüldüğünden, anonim işlev içinde tanımlanan her işlev için i değeri farklıdır.
Note that the variable alice is actually declared after the anonymous function.
This sends the iterator i into the anonymous function of which we define as index.
An anonymous function is just a function without a name.