Skip to content

solution#1472

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

solution#1472
uselessmorning wants to merge 1 commit intomate-academy:masterfrom
uselessmorning:develop

Conversation

@uselessmorning
Copy link

No description provided.

Copy link

@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 it correctly implements all required behaviors: you created two promises, one that resolves when the .logo element is clicked and another that rejects after 3 seconds, and both success/error handlers append the correct <div> messages directly to document.body. Functionally, this matches the task specification, including the exact success and error text and the proper class names on the created elements.

One thing to be aware of (not a blocker for this task) is that document.querySelector('.logo') can return null if the element doesn’t exist or the script runs before the DOM is ready; calling addEventListener on null would then throw a runtime error. In a real project, you could harden this by either wrapping your logic in a DOMContentLoaded listener or by checking if (logo) { logo.addEventListener(...) }. As a minor improvement, using element.classList.add('message', 'error-message') instead of assigning className directly would make it easier to extend styling later without overwriting existing classes. Overall, your promises and DOM updates are implemented cleanly and fulfill the task requirements well—nice work.


✨ 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