I looked around, but could not find anything suitable - this is in the vtl file, but I think this is the same syntax.
I want to insert something after every n elements, and not replace the nth element of the for loop, which I did by chance, trying to solve the problem. What would be the best way to approach this? Thousands of scrollable elements can exist.
My current code is:
for(var i = 0; i < data.results.length; i++) {
if(i % 5 == 0){
}
else{
}
}
source
share