Forelli2017-04-16 23:57:49
Forelli, 2017-04-16 23:57:49

Anonymous function or expression?

Let's take the simplest example of declaring a function as a function expression:

var someAct = function() {
alert('Who is here?");

Is it correct to understand that in any such expression, everything on the right is an anonymous function, and what is on the left (that is, the variable to which this anonymous function is assigned) is not a variable at all, but only a reference to this anonymous function?
That is, is it true that any functional expression is in fact an anonymous function? (well, a link to it)
Or you can take for an anonymous function only one where there are no identifiers at all, of the form:
(function(){ alert('anonymous') }) ();

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question