jQuery .each() method is to iterate over the elements in a jQuery collection without the need for the for loop syntax. For arrays, array-like objects, and objects, jQuery provides a function named $.each(). The syntax looks like: $.each(anArray, someComplexFunction);
The following is the example:
let anObject = {one:1, two:2, three:3};
$.each(anObject, function(name, value) {
// Do something here
});