JSFiddle - React, Tailwind, and code Playground
HTML
<table border="1">
<tr>
<th></th>
<!-- ko foreach: cols -->
<th data-bind="text: $data"></th>
<!-- /ko -->
</tr>
<!-- ko foreach: {data: rows, as: 'row'} -->
<tr>
<th data-bind="text:row"></th>
<!-- ko foreach: {data: $parent.cols, as: 'col'} -->
<td data-bind="text:row + '/' + col"></td>
<!-- /ko -->
</tr>
<!-- /ko -->
</table>
JavaScript
var VM = function(){
this.rows = ['one','two','three'];
this.cols = [1,2,3,4,5];
}
ko.applyBindings(new VM());