Weather App

Build a weather application

JavaScriptIntermediate
JavaScript
async function getWeather(city) {
    const response = await fetch(`https://api.weather.com/${city}`);
    const data = await response.json();
    return { temp: data.temp, condition: data.condition };
}

Output

// Weather data

Weather App fetches and displays weather data.