Skip to content

Sheffield | 26-ITP-Jan | Martha Ogunbiyi | Sprint 3| Sprint3 /Quote generator#1163

Open
marthak1 wants to merge 5 commits intoCodeYourFuture:mainfrom
marthak1:coursework/sprint-3
Open

Sheffield | 26-ITP-Jan | Martha Ogunbiyi | Sprint 3| Sprint3 /Quote generator#1163
marthak1 wants to merge 5 commits intoCodeYourFuture:mainfrom
marthak1:coursework/sprint-3

Conversation

@marthak1
Copy link
Copy Markdown

@marthak1 marthak1 commented Apr 2, 2026

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

Built quote generator app as per assignment requirements

@marthak1 marthak1 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 2, 2026
Comment on lines +492 to +493
const title = document.querySelector("title")
title.textContent = "Quote generator app";
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.

Why not just set the title in HTML?

Comment on lines +507 to +510
displayQuote();

// Change quote when button is clicked
button.addEventListener("click", displayQuote); 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 Apr 3, 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