Encountered a time string Unexpected token ‘{‘ error during JavaScript run in console

I’m facing a javascript error Unexpected token ‘{‘ on line 903 . I try to build an open source time zone comparison table and the function I try to add is a list of different time zones that can be selected and should be added to the table. The function does not change the time and I’ve tried to change the javascript function but none of them are working for me. This should be the related code.

<script>
  var d = new Date();

  function {
    var time, date = document.getElementById('hour0,date0');
    var country1 = document.getElementById('country1');
    var country2 = document.getElementById('country2');

    .innerHTML = dat0;

    if (time, date.value == "Afghanistan") {
      document.getElementById("hour0").innerHTML = d.toLocaleTimeString("en-US", {
        timeZone: 'UTC',
        hour: "numeric",
        minute: "2-digit"
      });
      var dat0 = d.toLocaleString('en-us', {
          timeZone: 'UTC',
          weekday: 'short'
        }) +
        "<br>" + d.toLocaleString('en-us', {
          timeZone: 'UTC',
          day: 'numeric',
          month: 'short'
        });
      document.getElementById("date0").innerHTML = dat0;


    }
  }

</script>

The whole code can be found at https://gitlab.com/hmmtime/hmmtime/-/blob/dev/index.html and visible in a browser by https://hmmtime.gitlab.io/hmmtime/