August 2016
Beginner to intermediate
847 pages
17h 28m
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 a (generally not recommended) alternative to the function literal (also known as function expression):
var sum = function (a, b) {
return a + b;
};Or, the more common function definition:
function sum(a, b) {
return a + b;
}|
Property/Method |
Description |
|---|---|
|
|
Allows you to call another function while overwriting the other function's this value. The first parameter that function whatIsIt(){ ... |