What is the difference between
I will assume you mean
$.map. The difference is that we use
$.grep to filter an array while we use
$.map to apply a function to each item in the array.
Here is a much better explanation than I can make: