Javascript?
Javascript?
JavaScript
Promise Methods
@WebOnset
Topics
1. Promise.resolve 2. Promise.reject
3. Promise.then 4. Promise.catch
5. Promise.finally 6. Promise.all
7. Promise.allSettled 8. Promise.race
9. Promise.any
@Webonset
1. Promise.resolve
Creates a promise that is resolved with the given
value.
2. Promise.reject
@Webonset
3. Promise.then
Attaches callbacks for the resolution or rejection
of the promise.
4. Promise.catch
Attaches a callback for handling promise
rejections.
@Webonset
5. Promise.finally
Attaches a callback that runs once the promise
is settled (fulfilled or rejected).
6. Promise.all
Waits for all promises to resolve. If any promise
is rejected, it rejects the entire result.
@Webonset
7. Promise.allSettled
Waits for all promises to settle (either fulfilled or
rejected) and returns an array of their statuses.
8. Promise.race
Resolves or rejects as soon as one promise in
the iterable resolves or rejects.
@Webonset
9. Promise.any
@Webonset
save post
Webonset