A function is an object that is unique to another object and that it can be called. Functions can be implemented: code reuse, information hiding, code combination calls.
When a function is established, it establishes: the context, the code that invokes the function. Each function (except Function.prototype) will have a prototype object.
function foo () { //code}
Foo.prototype = {Constructor:this};
It must have a Foo.prototype object, and this is explicitly included.
The function literal is the literal, and it belongs to the category of the expression. The function literal can then be used where the expression can be used.
The parameters of the JS function are passed by value. It does not check the type and number of arguments passed in, or if the parameter value is undefined when the argument is less than the formal parameter argument function. Each function is this,this when the function is executed, and is related to how the function is called (something similar to the dynamic scope). The invocation methods are divided into: Method invocation, Function call, constructor call, apply call.
JS Pristine (function)