Revvity interview question

How do promises in JS work