ko.utils.arrayForEach is independent of jQuery and just a shortcut to writing something like:
for (var i = 0, j = myArray.length; i < j; i++) { someMethod(myArray[i]); }
It only works with arrays. jQuery is not a strong knockout dependency. If it is available, then there are several places where Knockout will use it (a line for parsing the DOM and handling events).
$.each requires jQuery (obviously) and should be more flexible. It can iterate over properties both in an object and in arrays and work with jQuery objects. It also gives you an index during a loop.
RP Niemeyer
source share