Arc'teryx Interview Question

How do promises work in JavaScript