Google Scripts For Loop
You're trying to access the four arrays created from the values for columns 1-4.
Your for
statement needs to match their structure, starting with the first array instance of 0
. You can use any of the arrays for the iteration, I've chosen the first.
In addition, I've removed the function and replaced x
with the instance from evento
.
++
increments the value of the variable, no need for assignment there.
for (var i = 0; i < evento.length; i++) {
target.getRange(targetRow,1).setValue(evento[i]);
target.getRange(targetRow,2).setValue(descript[i]);
target.getRange(targetRow,3).setValue(tags[i]);
target.getRange(targetRow,4).setValue(sheetsIDHome[i]);
targetRow++;
}