Concaténation des données de boucle en variable à l'aide de jQuery

Below you can check the example of concate data in variable through for loop in jquery
Please refer '+=' in the code for concatenation example

var timedropdowndata = "<select name='select_time'><option>Select time</option>";
for(var hours=0; hours<24; hours++){
  for(var mins=0; mins<60; mins+=30){
    let timestamp = hours+":"+mins;
    timedropdowndata += "<option>"+timestamp+"</option>";

  } // the interval for mins is '30'
} // the interval for hours is '1'
timedropdowndata += "</select>";

I hope it will help you
thank you.
Ankur