dapoadedire / digital-world-clock

Local variable name shadows variable in outer scope JS-0123
Bug risk
Minor
4 occurrences in this check
'timezone' is already declared in the upper scope on line 8 column 7
13  clockContainer.appendChild(clock);
14}
15
16const currentTime = (clockElement, timezoneElement, timezone) => {17  const options = {
18    hour: "numeric",
19    minute: "numeric",
'e' is already declared in the upper scope on line 38 column 33
37
38form.addEventListener("click", (e) => {
39  e.preventDefault();
40  search.addEventListener("change", (e) => {41    userInput = String(e.target.value).toLowerCase().trim();
42    let FilteredTimeZoneArray = allTimezonesArray.filter((eachTimeZone) => {
43      let eachTimeZoneString = String(eachTimeZone.textContent).toLowerCase();
'timezone' is already declared in the upper scope on line 8 column 7
51  });
52});
53
54allTimezonesArray.forEach((timezone, index) => {55  currentTime(allClocksArray[index], timezone, timezones[index]);
56});
57
'timezone' is already declared in the upper scope on line 8 column 7
56});
57
58setInterval(() => {
59  allTimezonesArray.forEach((timezone, index) => {60    currentTime(allClocksArray[index], timezone, timezones[index]);
61  });
62}, 1000);