MSc-IT Study Material
June 2010 Edition

Computer Science Department, University of Cape Town

Discussion Topic

Generally, the definition of functions using the Function constructor and function literals is unnecessary since all functions can be defined using simple function statements such as the following:

      function myFunction( arg1, arg2 )
      {
      // body of function
      // optional function RETURN statement
      }
    

You can find some thoughts on this discussion topic at the end of the unit.