What would be the best way to stripe a list with KnockoutJS? The class on the div below should be even or odd depending where it is in the list, and update when adding or removi
I've found a function that returns an index when iterating with foreach, so you can apply even and odd classes in a reasonably compact way, for example: