back to catalog
promise wrap promise

      console.log('start')
      Promise.resolve().then(() => {
        console.log('promise1')
        setTimeout(() => {
          console.log('setTimeout2')
        })
        Promise.resolve().then(() => {
          console.log('promise3')
        })
      })
      setTimeout(() => {
        console.log('setTimeout1')
      })
      Promise.resolve().then(() => {
        console.log('promise2')
      })
      console.log('end')