Skip to content

try1#1553

Open
interpunktus wants to merge 1 commit into
mate-academy:masterfrom
interpunktus:develop
Open

try1#1553
interpunktus wants to merge 1 commit into
mate-academy:masterfrom
interpunktus:develop

Conversation

@interpunktus

Copy link
Copy Markdown

No description provided.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Review Summary

Your solution is approved because it correctly implements all the required promise behavior and DOM updates. You create promise1 and promise2 as specified, resolve promise1 on .logo click, and reject promise2 after 3 seconds using setTimeout, all with appropriate then and catch handlers. On success, you append a <div class="message"> with the exact text Promise was resolved!, and on error you append a <div class="message error-message"> with the exact text Promise was rejected!, which matches the task requirements.

One small robustness improvement you could consider is checking that document.querySelector('.logo') actually returns an element before attaching the event listener, to avoid a runtime error if the .logo element is missing in the HTML. Another minor enhancement would be to extract the shared success and error DOM-update logic into helper functions to avoid duplication and make future changes easier. Overall, you met the functional requirements well—nice work on cleanly wiring up promises with DOM manipulation.


✨ 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