.closest()

For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree.

.map()

Pass each element in the current matched set through a function, producing a new jQuery object containing the return values.