I don't know about Javascript, but in Flash, if you use the first method,
you can place the function in any location in your code and it can be called
from any location in your code. Using the second method, the function
definition has to be placed before it's call.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Olaf Gleba
Sent: Thursday, April 12, 2007 10:56 AM
To: [EMAIL PROTECTED]
Subject: [jQuery] Defining of a function


Hi,

Maybe i should take a break,- i don't get the point what differences it
makes defining a function as a named or a anonymous function.

function xxx () {
...
}

var xxx = function() {
...
}

What are the advantages and disadvantages of both of them?

Thx in advance.

--
Olaf Gleba





Reply via email to