I have multiple outputs in html. I want to reach them with for loop. For example: unitsTotal = 4;
Then I want to have (output1, tag1), (output2, tag2), (output3, tag3), (output4, tag4).
And I don't know how to pass i inside a string. Can someone help me with doing that? Maybe there is a better idea how to make it.
for (var i = 1; i < unitsTotal; i += 1) {
$(':input[name="output"]').val(output1.toFixed(5).toString());
$('#output').text(tag1);
}