Pergunta de entrevista da empresa Miro

question related to promises, like coding an event loop