Jordan Savant # Software Engineer

/*
 * A single promise can pass through several chained
 * `then` statements because `then` returns a promise
 * as well
 */
new Promise((resolve, reject) => {
  console.log("new Promise A")
  setTimeout(resolve(2), 1000)
}).then((data) => {
  console.log(`A ${data}`);
  return data * 2
}).then((data) => {
  console.log(`B ${data}`);
  return data * 2
}).then((data) => {
  console.log(`C ${data}`);
  return data * 2
})