Skip to content

Commit

Permalink
xc
Browse files Browse the repository at this point in the history
  • Loading branch information
A1exisMartinez committed May 22, 2024
1 parent 333e44d commit 387dbbc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Proto.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ const outputElement = document.getElementById("city-input");
const output = document.getElementById("out-put");
const button = document.querySelector("#city-button");
// button
outputElement.addEventListener("keyup", async function () {
outputElement.addEventListener("keyup", async function (event) {
if (event.key === "Enter") {
console.log(event.key);
const city = outputElement.value;
const responsedata = await fetchweatherData(city);
displayweatherData(responsedata);
});
}});

// don't touch this!!! unless you want to pass in another
// prarmeter like the zip-code and city in the future!
const fetchweatherData = async function (city) {
Expand Down

0 comments on commit 387dbbc

Please sign in to comment.