Can anyone help in understanding the difference between the following two function expressions:
a) var bar = function() {}; b) var bar = function foo() {};
I wrote how it was written in a). What is the importance of naming the function "foo" in b)?
How is a) different from b)?
Method a: a variable with a name barthat refers to an anonymous function. a function can only be used using a variable bar, wherever it is in scope.
bar
b: bar, foo. foo - , bar.
foo
Paulpro - foo , .
, , .
Source: https://habr.com/ru/post/1695958/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1695953/pass-props-to-all-of-its-children&usg=ALkJrhjFxLoizqSwJXjk5mcJSk6OY4kGCgДобавление повторяющихся параметров с помощью Retrofit v1.9.0 - androidЗаписывать записи непосредственно до и после времени - rСохранение всех возможных перестановок внутри R - rbackground-clip: border-box behaves the same as its value, - padding-box - cssLoading and scaling a gif image using Glide - android"Файл поврежден и не может быть открыт" OpenXML - c#How to catch exceptions from an indirect thread? - javaHow can I print 2 lines if the second line matches the first line? - bashBinding python interpreter used by my project and pipenv - pythonAll Articles