I was fooling around with JS a bit, and I found this:

Anyone care to explain?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
An anonymous function is one that doesn’t have a name. For example, you can do:
This creates a function with no name and immediately calls it. If the code caused an exception to be raised, the JavaScript runtime will report a failure in an anonymous function.
Also, functions are themselves objects with a class named
Function. You can use this class to define a new function like this (instead of the built-in syntax):This is pretty much the same as writing:
This gives you a peek into the object-oriented nature of JavaScript’s functions.