• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

The function Operator

Besides the Function object, JavaScript also supports a function operator. Following the lead of languages such as Perl and Java, the function operator enables you to define a function without a name—that is, an anonymous function. Here’s the syntax of this statement—note how much this works like just assigning a function definition to a variable:

var variableName = function([parameter1 [, parameter2...[, parameterN]]]) 
{functionBody} 


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint