promise basic#1555
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because the core promise behavior and DOM manipulation match the task requirements. You correctly create promise1 and promise2, resolve promise1 on .logo click, and reject promise2 after 3 seconds, which fully satisfies the functional checklist items [CHECKLIST ITEM #1–#5]. Both the success and error handlers append the required <div> elements with the correct classes and texts to document.body, matching the expected UI behavior [CHECKLIST ITEM #6–#7]. The demo link format in the PR body also follows the specified pattern [CHECKLIST ITEM #8].
The remaining checklist items about running tests and following the external layout guidelines cannot be verified from this code alone, but there is nothing here that conflicts with them. As a minor improvement, you might add a safety check around document.querySelector('.logo') in case the element is missing, to avoid potential runtime errors in a different HTML context. Overall, the implementation is clear, meets the stated functional requirements, and is suitable to move forward.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨
<your_account>with your Github username in the linknpm run testcommand to test your code;npm run test:only -- -nto run fast test ignoring linter;npm run test:only -- -lto run fast test with additional info in console ignoring linter.