July 2008
Beginner
356 pages
6h 8m
English
JavaScript functions are objects. They can be defined using the Function constructor, like so:
>>> var sum = new Function('a', 'b', 'return a + b;'); This is equivalent to the function literal:
>>> var sum = function(a, b){return a + b;};or the more common:
>>> function sum(a, b){return a + b;}The use of the Function constructor is discouraged in favor of the function literals.
|
Property/Method |
Description |
|---|---|
|
|
Allows you to call another function while overwriting its function whatIsIt(){ ... |
Read now
Unlock full access