text: // const doWorkPromise = new Promise((resolve, reject) => {
  //   setTimeout(() => {
  //     resolve([2, 5, 8]);
  //     // reject('Things went wrong!')
  //   }, 2000);
  // });
  
  // doWorkPromise
  //   .then(result => {
  //     console.log('Success', result);
  //   })
  //   .catch(error => {
  //     console.log(error);
  //   });
  
  const add = (a, b) =>
    new Promise((resolve, reject) => {
      setTimeout(() => {
        resolve(a + b);
      }, 2000);
    });
  
  /* add(1, 2)
    .then(sum => {
      console.log(sum);
    })
    .catch(e => {
      console.log(e);
    }); */
  
  add(1, 1)
    .then(sum => {
      console.log(sum);
      return add(sum, 4);
    })
    .then(sum => {
      console.log(sum);
    })
    .catch(e => {
      console.log(e);
    });
  