| 66 | |
| 67 | //DISPLAYING THE WEATHER TO THE UI |
| 68 | function displayWeather() { |
| 69 | locationElement.textContent = `${weather.city}, ${weather.country}`; |
| 70 | weatherIconElement.innerHTML = `<img src="./icons/${weather.iconID}.svg" alt="icon">`; |
| 71 | descElement.textContent = `${weather.description}`; |
| 72 | tempElement.innerHTML = `${weather.temperature.value}<span>°c</span>`; |
| 73 | humidityElement.innerHTML = `<img class="humidity-icon" src="./extraicons/humidity.svg" alt="humidity">${weather.humidity}`; |
| 74 | } |
| 75 | |
| 76 | // CELSIUS TO FAHRENHEIT CONVERSION |
| 77 | function celsiusToFahrenheit(temp){ |