Promise states
Promise has states. Initially, when a Promise is created, it is in the pending state. This is the initial state. Once the asynchronous operation completes, the Promise moves to the resolved state. There are two possible states within ‘resolve’. These are: ‘fulfilled’ and ‘rejected’. A successful result of a