javascript - How to prepend a string to a string variable in a for loop without changing the loop structure? -
if have loop this:
var rows; var len = z[0].length; ( var = len; i--; ) { rows += "<tr><td>" + z[0].marketer + "</td><td>"; }
how can prepend instead of append current row string without changing loop structure?
var rows; var len = z[0].length; ( var = len; i--; ) { rows (prepend) "<tr><td>" + z[0].marketer + "</td><td>"; }
like this:
rows = "<tr><td>" + z[0].marketer + "</td><td>" + rows;
Comments
Post a Comment