es6-promises Flashcards
1
Q
What are the three states a Promise can be in?
A
pending fulfilled and rejected
2
Q
How do you handle the fulfillment of a Promise?
A
then() method, pass it the the function you want to run when the promise is successful as an argument
3
Q
How do you handle the rejection of a Promise?
A
catch method, pass it the the function you want to run when the promise gets rejected as an argument