Map function translates a set of elements into another set of values in a jQuery array that may or may not have the elements. The map is called:
$(“<element>”).map(<function to execute for elements in the object>)
Grep, on the other hand, finds an element in an array.
jQuery.grep(myArr, function(){}