// For asynchronous programming, handle asynchronous callbacks elegantly, avoid callback hell

/** Promise A/Promise A+

The failed state can only be Fulfilled by Pending –> Fulfilled or Pending –> Fulfilled, and once the Fulfilled state is changed, it cannot be modified twice.

Pass excutor(resolve,reject), resolve/reject callback call, which is used to change the state of the then function, add the callback then chain call => return the Promise object itself. => queue array to hold callbacks[] all function race function */