What is the purpose of the .each() method in jQuery?
Description : Usage of the .each() method.
Answer :
The `.each()` method in jQuery is used to iterate over a jQuery object, executing a functionfor each matched element. It is useful for performing actions on multiple elements. For example:`$('li').each(function(index, element) { $(this).addClass('highlight'); });` adds the 'highlight'classto each `<li>` element.