increment loop id js code example Example: for loop for increment id of div in jquery for (let i = 0; i < 6; i++) { $(`#my_id_${i}`).val('test'); }