Check out example codes for "for loop for increment id of div in jquery". It will help you in understanding the concepts better.

Code Example 1

for (let i = 0; i < 6; i++) {
  $(`#my_id_${i}`).val('test');
}

Learn ReactJs, React Native from akashmittal.com