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

Chapter 12. Functions > Function Literals

Function Literals

A function literal is defined in an expression, as opposed to being a standalone function. The biggest difference between a function literal and a function is that a function literal is not reusable. Following is an example of a function literal:

Sqr = function(z) { return this.z * z; };


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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