1. each() method is used to iterate over both arrays and objects.2. $.each() function is different from $(selector).each(), which is used to iterate exclusively over jQuery object.3. $.each() function can be used to iterate over any object, whether it is javascript object or an array.

In above example, we have created 4 div elements. Using class selector we are selecting all div's in an jquery object. Using each object, we are iterating over each div and printing the text and index.

In above example, we have rendered 4 checkboxes. And on checking more than one checkbox, we are using checked selector to select all checked checkboxes and used each() method to iterate through each checked checkbox and displaying the result.