.each() in jQuery

It iterate over a jQuery object, executing a function for each matched element.

.each()

// To alert the text of each < li> element:

$(“button”).click(function(){
    $(“li”).each(function(){
       alert($(this).text())
    });
});