London | ITP-Jan-2026 | Ping Wang | Sprint 3 | Quote Generator Sprint 3/quote generator#1036
London | ITP-Jan-2026 | Ping Wang | Sprint 3 | Quote Generator Sprint 3/quote generator#1036pathywang wants to merge 8 commits intoCodeYourFuture:mainfrom
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
While Lighthouse score is not part of the requirement, it's a good to keep the score at 100.
Sprint-3/quote-generator/quotes.js
Outdated
| button.addEventListener("click", showQuote); | ||
|
|
||
| showQuote(); No newline at end of file |
There was a problem hiding this comment.
Placing all the "run on load" code in one place is a good practice.
Would be even better to place the code inside a function to make it clearer that "this is what runs when the page loads."
For examples,
function setup() {
// code to be executed on page load
}
window.addEventListener('load', setup);or
window.addEventListener('load', function() {
// code to be executed on page load
});There was a problem hiding this comment.
Thanks, it is.so i update my code now but it did take me a while to get round so i need more practice
There was a problem hiding this comment.
i checked my index.html with lighthouse, now the performance is 100. From now on, i should check my html with light house as a routine,thanks
There was a problem hiding this comment.
According to Lighthouse,
Background and foreground colors do not have a sufficient contrast ratio.
If you have made any changes, don't forget to push the commits to GitHub as well.
|
Changes to the HTML and JS look good. |
Self checklist
Changelist
It did take me a while to get around about this course work because it is quite different from previous single JavaScript code work.