I'm trying to do something like the following (stripped of optimization for demonstration purposes):
table
- for(j = 0; j < 10; j++)
tr
td Name
td -for(i = 0; i < 10; i++) // Output a a letter from an array
#{data[i] + list[i][j]}
- if(j < list[i].length) // Add a comma if it isn't the last element
,
The idea is that the second td will contain a list of comma-separated values, and the if statement will check if it's the last one - if not, add the comma. I'm sure it's more so just my amateur understanding of Jade that's making this feel impossible. Seems like I can't quite get the value in the right place for the td - because of my indentation, it makes a new tag with a name of data[i] + list[i][j]
which actually seems like the right thing for Jade to do, but I just can't see how else to accomplish this and Jade documentation is scarce.