code: function fulfill(promise, value) {
      if (promise.state !== PENDING) return;
  
      promise.value = value;
      promise.state = FULFILLED;
  
      return resolve(promise);
    }
docs: Fulfill a promise with the given `value`. Returns the promise.