Skip to content

Glasgow | JAN-ITP-2026 | Alasdair MacDonald | Sprint 3 | Quote Generator app#1035

Open
MacDonald91 wants to merge 3 commits intoCodeYourFuture:mainfrom
MacDonald91:coursework/quote-generator-app
Open

Glasgow | JAN-ITP-2026 | Alasdair MacDonald | Sprint 3 | Quote Generator app#1035
MacDonald91 wants to merge 3 commits intoCodeYourFuture:mainfrom
MacDonald91:coursework/quote-generator-app

Conversation

@MacDonald91
Copy link
Copy Markdown

Learners, PR Template

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

Finished building a complete working quote generator app.

Questions

no questions.

@MacDonald91 MacDonald91 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 17, 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.

Code is working good.

Note: 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 AI Why should programmers respect "DO NOT EDIT BELOW HERE" instruction in a file?

Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +503 to +508
displayRandomQuote();

// button click
document
.getElementById("new-quote")
.addEventListener("click", displayRandomQuote);
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.

Can you put all the "run on load" code inside a function?
Doing so can 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
});

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thanks for the suggestion!

I’ve moved all the “run on load” logic into a setup function and attached it to the window load event to make the structure clearer and easier to understand.

Let me know if there’s anything else I can improve.

@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 26, 2026
@MacDonald91 MacDonald91 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 15, 2026
@cjyuan
Copy link
Copy Markdown
Contributor

cjyuan commented Apr 16, 2026

All good. Well done.

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

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants