Pergunta de entrevista da empresa Rootstack

How does the promises work on JavaScript?