jQuery.each implementation differs from native Array.forEach
问题 Does anyone why is the otherwise excellent jQuery.each function is designed differently from the (now) native Array.forEach ? F.ex: var arr = ['abc','def']; arr.forEach(function(entry, index) { console.log(entry); // abc / def }); This makes absolute sense. But jQuery chose to put the index as first argument: $.each(arr, function(index, entry) { console.log(entry); }); Does anyone know the reasoning behind this design decision? I have always used $.each extensively, but it always bugged me