Created
May 5, 2020 23:33
-
-
Save ablwr/65516cd54e84b19e31ab9fad683cc448 to your computer and use it in GitHub Desktop.
weatherInCascadiaNow
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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