function formatAllTimeZones() {
  let timeZoneTable =
    "<tr><th>Country Code</th><th>Country Name</th><th>Zone Name</th><th>Time</th><th>Date</th><th>Add</th></tr>";

  allTimeZonesToRender.forEach(function (timeZone, index) {
    const row = `<tr><td>${timeZone.countryCode}</td><td>${
      timeZone.countryName
    }</td><td>${timeZone.zoneName}</td><td>${timeZone.zoneTimeDate.format(
      "HH:mm:ss"
    )}</td><td>${timeZone.zoneTimeDate.format(
      "DD-MM-YYYY"
    )}</td><td>  <button id="${"Add_" + String(index)}">Add</button></td></tr>`;
    timeZoneTable = timeZoneTable + row;
  });
  document.getElementById("timeZonesTable").innerHTML = timeZoneTable;
}
// this renders the timeZones in allTimeZonesToRender.
this renders the timeZones in allTimeZonesToRender.
this renders the timeZones in allTimeZonesToRender .
function formatAllTimeZones() {
  let timeZoneTable =
    "<tr><th>Country Code</th><th>Country Name</th><th>Zone Name</th><th>Time</th><th>Date</th><th>Add</th></tr>";
  allTimeZonesToRender.forEach(function (timeZone, index) {
    const row = `<tr><td>${timeZone.countryCode}</td><td>${
      timeZone.countryName
    }</td><td>${timeZone.zoneName}</td><td>${timeZone.zoneTimeDate.format(
      "HH:mm:ss"
    )}</td><td>${timeZone.zoneTimeDate.format(
      "DD-MM-YYYY"
    )}</td><td>  <button id="${"Add_" + String(index)}">Add</button></td></tr>`;
    timeZoneTable = timeZoneTable + row;
  });
  document.getElementById("timeZonesTable").innerHTML = timeZoneTable;
}
function formatAllTimeZones ( ) { let timeZoneTable = "<tr><th>Country Code</th><th>Country Name</th><th>Zone Name</th><th>Time</th><th>Date</th><th>Add</th></tr>" ; allTimeZonesToRender . forEach ( function ( timeZone , index ) { const row = ` ${ timeZone . countryCode } ${ timeZone . countryName } ${ timeZone . zoneName } ${ timeZone . zoneTimeDate . format ( "HH:mm:ss" ) } ${ timeZone . zoneTimeDate . format ( "DD-MM-YYYY" ) } ${ "Add_" + String ( index ) } ` ; timeZoneTable = timeZoneTable + row ; } ) ; document . getElementById ( "timeZonesTable" ) . innerHTML = timeZoneTable ; }
this renders the timeZones in allTimeZonesToRender.
this renders the timeZones in allTimeZonesToRender .