Understanding JavaScript Promise resolution & rejection

Understanding JavaScript Promise resolution & rejection