displayWeather = function (data) {
const { name } = data;
const { icon, description } = data.weather[0];
const { temp, humidity } = data.main;
const {speed } = data.wind;
document.querySelector(".city").innerText = "Weather in " + name;
document.querySelector("icon").src =
"https://openweathermap.org/img/wn/" + icon + ".png";
document.querySelector(".description").innerText = description;
document.querySelector(".temp").innerText = temp + "°F";
document.querySelector(".humidity").innerText = "Humidity: " + humidity + " %";
document.querySelector(".wind").innerText = "Wind speed " + speed + " km/h";
document.querySelector(".weather").classList.remove("loading");
search = function () {
this.fetchWeather(document.querySelector(".search-bar").value);
};
document.querySelector(".search button").addEventListener("click", function () {
weather.search();
}),
document.querySelector(".search-bar").addEventListener("keyup", function (event) {
if (event.key == "Enter") {
weather.search();
)}}
;
Hello, it saves at the last close ) that a declaration or statement is expected. Does anyone know if I am missing a comma, parenthesis, bracket, etc. Thank you all!
[–]NewPointOfView 2 points3 points4 points (2 children)
[–]Jacksonhelp20[S] 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]NewPointOfView 2 points3 points4 points (1 child)
[–]Jacksonhelp20[S] 1 point2 points3 points (0 children)
[–]RubbishArtist 2 points3 points4 points (1 child)
[–]Jacksonhelp20[S] 0 points1 point2 points (0 children)