-
-
Notifications
You must be signed in to change notification settings - Fork 155
London | 25-ITP-May | Houssam Lahlah | Sprint 3 | Clean Quote-Generator #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Changed console.log to use address.houseNumber instead of address[0] - Ensures correct display of house number in output
- Replaced invalid for...of loop on object with Object.values() - Ensures all property values of author are logged without errors
- Replaced object string output with ingredients joined by newline - Ensures each ingredient is printed on its own line as intended
…and fix it from the original main branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Code is good.
-
Branch is not clean. You should reset the accidental commits made on your
main
branch.
|
||
function displayRandomQuote() { | ||
const randomQuote = pickFromArray(quotes); | ||
document.getElementById("quote").textContent = randomQuote.quote; | ||
document.getElementById("author").textContent = randomQuote.author; | ||
} | ||
|
||
// Show a quote immediately on page load | ||
displayRandomQuote(); | ||
|
||
// Set up button click to get a new quote | ||
document.getElementById("new-quote").addEventListener("click", displayRandomQuote); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should respect instructions like DO NOT EDIT BELOW HERE
; it is usually there for a reason. If you are curious about why, you can ask ChatGPT Why should programmers respect "DO NOT EDIT BELOW HERE" instruction in a file?
No description provided.