1. JavaScript Function Basics
1. Defining methods
2. Methods for calling functions
3. Function methods
Apply: Call the function as an array method to pass the parameter as an array to the method
Call: A method that invokes a function as an object to pass a set parameter to the method
ToString: Returns the string representation of a function
4. Arguments objects
arguments Object
Function: A list of parameters that hold arguments
Attribute: can only be initialized automatically within the function body using a subscript attribute but not an array function declaration
Property:
A) length Gets the lengths of the function arguments
B) callee Returns the function that is currently pointing
C) Caler Returns the name of the function that is calling the currently executing function
5. Function parameters
Parameter type:
Parameters that are used when a parameter definition function receives the parameter passed when the parameter is called
Actual arguments passed to the function when the argument is called
Characteristics:
No limit on the number of parameters
Argument < parameter superfluous parameter = undefined
Argument > Parameter superfluous argument ignored
There is no limit to the data type of the parameter
Accessing a parameter array through a arguments object
Parameters are always passed by value
Basic type pass-through value
Reference type Address
6. Pointer identification
This points to the current action object
Callee pointer to the function that the parameter collection belongs to
Prototype pointing to the prototype object that came with the function
Constructor points to the constructor that created the object
JavaScript Function Basics