Executes the argument function for each element of the array.
func | In the case of a string, that method of the array element is called, and in the case of a function, it is called in the form of function (value, index, args *). |
args | Specify any number of arguments to pass to the function to call. It does not have to be. |
The value returned by the calling function
Calls the specified function once for each element of the array.
If the context is null, such as an anonymous function, it will be called in the array context.
If the function returns a value, processing is interrupted and that value is used as the return value of this function.
When the function is called as a string, the method of all array elements is called without interruption even if the value is returned.