es6-promises Flashcards

1
Q

What are the three states a Promise can be in?

A
  1. resolve
  2. reject
  3. pending
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you handle the fulfillment of a Promise?

A

With a value. A “.then()” method is called along with its associated handlers.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you handle the rejection of a Promise?

A

With a reason (error). A “.then()” method is called along with it’s associated handlers. Or a “.catch()” method can be used to catch the error.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly