var items = [1,2,3,4];
$.each(items, function() {
alert('this is ' + this);
});
var newItems = $.map(items, function(i) {
return i + 1;
});
// newItems is [2,3,4,5]
each : 기존 배열 반환
map : 새 배열 반환 (요소를 추가하거나 제거 가능)
ref : https://stackoverflow.com/questions/749084/jquery-map-vs-each