how i can use for or while fooor in datatable();

how i can use for or while fooor in datatable();

AnouarAnouar Posts: 1Questions: 1Answers: 0

im trying now to use loop for to add title dynamically here is the example .

$(this.$.idoftable).dataTable({

// in this table theris some title
"data": this.tableContents.table ,
for (i = 0 ; i < table.length ; i++){
console.log(table[i]);

        } 
          "aoColumns":[
                      { "title": table[i]; }
           ]
      });
This discussion has been closed.