Dimebox Interview Question

How do promises work in JS?