05 / 17

What is the purpose of `Promise.resolve()` and `Promise.reject()`?

  1. 1

    Promise.resolve() returns a resolved Promise with the given value.

  2. 2

    Promise.reject() returns a rejected Promise with the given reason.

javascript