Skip to content

add solution#1352

Open
Yevhen-Srdk wants to merge 1 commit intomate-academy:masterfrom
Yevhen-Srdk:develop
Open

add solution#1352
Yevhen-Srdk wants to merge 1 commit intomate-academy:masterfrom
Yevhen-Srdk:develop

Conversation

@Yevhen-Srdk
Copy link
Copy Markdown

Copy link
Copy Markdown

@mateacademy-ai-mentor mateacademy-ai-mentor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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! ✨

Footnotes

  1. Rate AI review example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants