Pergunta de entrevista da empresa Miro

taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 4")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); taskRunner.add(logAfterDelay("Delayed by 6")); // --- Helpers --- const startingTime = Date.now(); function logAfterDelay(logString) { return () => { return new Promise((resolve, reject) => { setTimeout(() => { console.log(logString, getDelay(startingTime)); resolve(); }, 2000); }); }; } function getDelay(startingTime) { return [${Math.round((Date.now() - startingTime)/1000)}s delay]; }

Resposta da entrevista

Sigiloso

25 de jan. de 2022

1st Interview was nice. During the second round coding challenge, that were provided above, I face with some difficulties with completing it but in almost did it on 80% (met 2 out of 3 acceptance criteria). After asking for little hints from interviewers they jumped in to help me but in the end they COULD NOT found a proper solution to the task either. Despite we agreed that at least I was thinking in the right way and were very close to the successfully finish the task got rejection result which was a total surprise to me.