Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
weatherInCascadiaNow
let weatherInCascadiaNow = async function getWeather() {
return fetch('https://api.weather.gov/gridpoints/SEW/121,70/forecast')
.then(response => response.json())
.then(data => {
return data.properties.periods[0].shortForecast
})
.then(output => document.getElementById('h1').innerHTML = output)
};
weatherInCascadiaNow();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment