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

Chapter 11.  Further Topics in JavaScrip... > The Function( ) Constructor and Func...

11.5. The Function( ) Constructor and Function Literals

As we saw in Chapter 7, there are two ways to define functions other than the basic function statement. As of JavaScript 1.1, functions can be defined using the Function( ) constructor, and in JavaScript 1.2 and later, they can be defined with function literals. You should be aware of some important differences between these two techniques.

First, the Function( ) constructor allows JavaScript code to be dynamically created and compiled at runtime. Function literals, however, are a static part of program structure, just as function statements are.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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