A promise object is nothing but returns a future of instance weather the promise is completed, rejected or failed!
We can chain the promises one to another using .then, this is known as nesting of promises!
States of Promises :
Pending → initial state (neither fulfilled nor rejected)
Fulfilled → the promise is successfully completed and given the respective response
Rejected → the operation is failed (we can catch the error using .catch even in nesting
For example :
For Reference :


