• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Functions > Function Literals

9.5. Function Literals

ActionScript allows us to create function literals, which are convenient when we need a function temporarily or when we want to use a function where an expression is expected.

Function literals have the same syntax as standard function declarations, except that the function name is omitted and there's a semicolon after the statement block. The general form is:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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