Last active
April 9, 2020 19:52
-
-
Save copperwall/c8e9c5ff2b8f6be61da102c88a3dbc80 to your computer and use it in GitHub Desktop.
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
function *sortOfAsyncFunction() { | |
const ivysaur = yield fetch('https://pokeapi.co/api/v2/pokemon/ivysaur'); | |
return ivysaur.name.toUpperCase(); | |
} | |
// "IVYSAUR" | |
runner(sortOfAsyncFunction).then(result => console.log(result)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment