Row 763: three parameters.
Elems: the array or object to be traversed.
Callback: the callback function is executed on each element or attribute of an array. Two parameters are input during execution: array element, element subscript, or attribute name and attribute value.
Arg: only used internally by jQuery. If $. map () is called to pass in the parameter arg, the parameter will be passed to the callback function callback;
The code of the first line is a little long. modify the number of lines.
IsArray = elems instanceof jQuery
| Length! = Undefined & typeof length = "number"
& (Length> 0 & elems [0] & elems [length-1])
| Length = 0
| JQuery. isArray (elems)
);
Parse the above Code.
If elems is a jQuery object, isArray = true;
If elem. length is numeric and one of the conditions is met, isArray = true:
Length> 0, elems [0] is true, and elems [length-1] is true.
Length = 0
Elems is an array.
771 ~ Row 3: For an array or a class array object (document. getElementByClassName ("myClass"), callback is executed for each element through the for loop subscript. If the return value of callback is not null, the returned value is placed in the array ret.
781 ~ Row 3: for objects, the property name is traversed through the for-in loop and callback is executed for each attribute. The input parameter is the property value, key value, arg. if the return value of callback is not null, the return value is placed in the ret array.
Row 792: Call concat () on an empty array, merge ret into an empty array, and return a new array. (concat () is used to merge arrays .)