4 ms·
JS has language level support for that now, too! async function getThings() { const user = await fetchUser(url) const address = await fetchAddr
by rbalicki 9y ago
JS has language level support for that now, too!
async function getThings() {
const user = await fetchUser(url)
const address = await fetchAddress(user.address)
return address.zipcode
}
// in some code
getThings().then(zip => document.write(zip))