try1#1553
Conversation
mateacademy-ai-mentor
left a comment
There was a problem hiding this comment.
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! ✨
No description provided.