London | 26-ITP-Jan | Maryanne Mosonik | Sprint 3 | Quote Generator - #1123
London | 26-ITP-Jan | Maryanne Mosonik | Sprint 3 | Quote Generator#1123Maryanne-K wants to merge 3 commits into
Conversation
Luro91
left a comment
There was a problem hiding this comment.
The code works correctly. Take a look at the code formatting
| function getRandomQuote() { | ||
| const randomQuote = pickFromArray(quotes); | ||
|
|
||
| document.getElementById("quote").textContent = randomQuote.quote; | ||
| document.getElementById("author").textContent = randomQuote.author; | ||
| } | ||
| getRandomQuote(); | ||
|
|
||
| document.getElementById("new-quote").addEventListener("click", getRandomQuote); No newline at end of file |
There was a problem hiding this comment.
What tools could you use to automatically format your code?
There was a problem hiding this comment.
@Luro91 I have formatted the document with Prettier.
Luro91
left a comment
There was a problem hiding this comment.
Well done the code works as expected.
A note on your commit message "Refactor getRandomQuote function for improved readability"
Refactoring usually refers to changing the logic of the code (e.g. adding helper functions, changing conditions...)
If you just change the format you can use a commit messsage like "Format code with prettier" or "Improve code formatting"
|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist
Made changes to the Quote Generator files to show random quotes.