LOADING...

Preview

Pen ID
Unlock Campus Themeforest adv

 

JS
const api = {
  fetchProduct () {
    return Promise.reject(new Error('err'))
  },
  fetchSeller () {
    return Promise.reject(new Error('err'))
  },
  statistic () {
    return Promise.reject(new Error('err'))
  },
  needStatisticProductAndSeller () {
    return Promise.reject(new Error('err'))
  }
}

async function doo () {
  const product = await api.fetchProduct()
  const seller = await api.fetchSeller(product.id)
  const statistic = await api.statistic(product, seller)
  const res = await api.needStatisticProductAndSeller(statistic , product, seller)
}

try {
  doo()
} catch (err) {
  console.err(err)
}
Term
Wed, 12/27/2017 - 07:00

Related Codes

Pen ID
Pen ID
Pen ID
Square Adv