Skip to content

London | ITP-Jan-2026 | Ping Wang | Sprint 3 | Quote Generator Sprint 3/quote generator#1036

Open
pathywang wants to merge 5 commits intoCodeYourFuture:mainfrom
pathywang:sprint-3/quote-generator
Open

London | ITP-Jan-2026 | Ping Wang | Sprint 3 | Quote Generator Sprint 3/quote generator#1036
pathywang wants to merge 5 commits intoCodeYourFuture:mainfrom
pathywang:sprint-3/quote-generator

Conversation

@pathywang
Copy link
Copy Markdown

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

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.

@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 18, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While Lighthouse score is not part of the requirement, it's a good to keep the score at 100.

<h1>hello there</h1>
<p id="quote"></p>
<p id="author"></p>
<p class="container">Test</p>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this element (line 14)?


// call pickFromArray with the quotes array to check you get a random quote

console.log(pickFromArray(quotes));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any unnecessary code should be removed to keep our code clean.

Comment on lines +508 to +510
button.addEventListener("click", showQuote);

showQuote(); No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
});

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants