Map Each Matching Element Into jQuery Object .map(Function)

.map(Function)

Function: function(index,element){...}
e.g. $("div").map( function(index) { return ...} )

.map(Function) maps each element in the matched set into jQuery object.

Example 1: $("div").map( function(index){ return $(this).attr("id")+" - "+index }) will return id and index of each element in an array.
 //return ["a - 0", "b - 1", "c - 2"] 
<div id="a">A</div>
<div id="b">B</div>
<div id="c">C</div>
jQuery traversing filtering .map(Function)