add solution#1352
Conversation
Yevhen-Srdk
commented
Feb 19, 2026
- DEMO LINK
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
Review Summary
I am approving your solution because all core requirements are implemented correctly: the three promises behave as specified, notifications are created with the proper structure and classes, and event listeners are wired to the correct document events. firstPromise correctly resolves on left click and rejects after 3 seconds if not clicked, and secondPromise only resolves on left or right click and never rejects, which matches the task description. thirdPromise also waits for both left and right clicks before resolving, which satisfies the functional requirement, even though it currently relies on shared flags.
The main thing to be aware of for future improvement is that using shared global flags for thirdPromise can make behavior harder to reason about and potentially order-dependent; a more robust pattern would keep those flags local to the promise or its handler. You also have some minor polish opportunities, like renaming helper functions to be more descriptive and removing handlers or catch blocks that can never be triggered, but these are not blockers for this assignment. Overall, your implementation is clear, meets the functional criteria, and should work well in both manual testing and automated checks.
✨ Please rate this review in the Platform's notification center1. I will be grateful for your feedback! ✨