763 rows: three parameters.
Elems: The array or object to be traversed.
Callback: The callback function executes on each element of an array or on each property of an object. Two arguments passed in when executing: array element, element subscript, or property name, property value.
ARG: Only used within jquery. If the call to $.map () is passed to the parameter arg, the parameter is passed to the callback function callback;
The code for line 768 is a bit long and modifies its number.
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, then isarray=true;
If Elem.length is numeric and satisfies one of the conditions, Isarray=true:
Length>0 and Elems[0] is true, and elems[length-1] is true.
Length==0
Elems is an array.
771~778 rows, for arrays or class array objects (Document.getelementbyclassname ("MyClass")), the callback is executed for each element through a for loop subscript, if the return value of callback is not NULL , the return value is placed in the array ret.
781~789 rows, for an object, the property name is traversed through the for-in loop, the callback is executed for each property, the passed parameter is the property value, the key value, and Arg. If the return value of callback is not NULL, the return value is placed in the RET array.
792 rows: Call Concat () on an empty array, merge ret into an empty array, and return a new array. (Concat () is used to merge arrays.)