If your needs are more presentable, then behavioral (i.e. just a stylistic separator), and you don't need to support older browsers, you should consider whether CSS can do the trick.
Imagine your DOM created by KO looks like this:
<div data-bind="template: bla bla"> <div class="tmpl">template instance 1</div> <div class="tmpl">template instance 2</div> <div class="tmpl">template instance 3</div> <div class="tmpl">template instance 4</div> </div>
You can insert βseparatorsβ using the ::after pseudo-class, and then disable it for the last element.
.tmpl::after { content:''; display:block; background-color: silver; height: 2px; margin:5px 0; } .tmpl:last-child::after { display: none; }
Depending on your use case, you can really do quite a lot with the generated blocks in CSS, and it is always a good day when you can cut some JS and put CSS instead;)
Exmaple fiddle http://jsfiddle.net/RTD7q/
Svend source share