Please enable JavaScript.
Coggle requires JavaScript to display documents.
PROMISES - Coggle Diagram
PROMISES
promise.reject should always be wrapped by String(err) so that we can see the actual error. Not requires return inside catch. Exemple: .catch((err) => Promise.reject(String(err)));
RETURN KEYWORD
-
use promise.reject only for intermidiate promises, the last one just return the promise
Promise
-
instead of rejecting immediately if any promise rejects, it waits for all promises to settle (either resolve or reject) and then returns an array of objects with the status and value/reason for each promise.
-
-