Jquery.each (object,
[callback])
A general-purpose example of a method that can be used to sample objects and arrays.
Unlike the $ (). each () method of the JQuery object, this method can be used to sample any object. The callback function has two parameters: the first is the index of the object's member or array, and the second is the corresponding variable or content. If you need to exit each loop so that the callback function returns false, the other return values are ignored.
Jquery.map (Arr|obj,callback)
Converts an element in an array to another array.
The conversion function as a parameter is called for each array element, and the conversion function is passed a parameter that represents the transformed element. The conversion function can return a converted value, null (delete an item in an array), or an array containing a value, and extend to the original array.
---------------------------------------------------------------------------------------------------------
The use of each function and the map function in jquery looks similar, but there is a little bit of a difference.
Each returns an array of the original, and does not create a new one.
The map method returns a new array.
jquery each and map differences