Click Here to view project
- Dynamic Display: The application dynamically presents weather information, including temperature, conditions, wind speed, and humidity.
- Flexibility: Users can input a city for quick results.
- Error Handling: In case of invalid input or an issue with the API, the application gracefully handles errors and provides a user-friendly message.
- Open the Application: Open the application in your preferred web browser.
- Input City: Enter the desired city in the provided field.
- Fetch Weather: Click the "Search" button to fetch and display real-time weather information.
- Explore Data: Explore the presented data, including temperature, conditions, wind speed, and humidity.
This application uses the WeatherAPI. Ensure you have a valid API key and replace it in the fetch URL in the weather
function in script.js
.
const APIKey = 'YOUR_API_KEY';
fetch(`https://api.weatherapi.com/v1/current.json?key=${APIKey}&q=${city}`)
.then(response => response.json())
.then(weatherData => {
// Rest of the code
});
- Weather data provided by WeatherAPI.