es6-promises Flashcards
1
Q
What are the three states a Promise can be in?
A
Resolved. Rejected. Pending.
2
Q
How do you handle the fulfillment of a Promise?
A
the promise can have .then() methods on it which handle resolved states in param1 and rejected states in param2
3
Q
How do you handle the rejection of a Promise?
A
the rejection of a project can be handled by param2 in a promise.then() method call or by a catch() at the end of a chain of promise.then().then().then().catch()