An alternative to For -loops is Array.prototype.forEach() , which uses the following syntax : myArray.forEach(function(value, key, myArray) ... ... <看更多>
Knockout will supply the following parameters to your callback: A DOM node being added to the document; The index of the added array element ... ... <看更多>