Non-Promise Thenables
Learn about non-promise thenables in detail.
We'll cover the following
Non-promise thenables
Both Promise.resolve()
and Promise.reject()
also accept non-promise thenables as arguments. When passed a non-promise thenable, these methods create a new promise that is called after the then()
function.
A non-promise thenable is created when an object has a then()
method that accepts a resolve
and a reject
argument, like this:
Get hands-on with 1400+ tech skills courses.