Skip to content

London | 26-ATP-Jan | Boualem Larbi Djebbour | Sprint 3 | Quote generator#1200

Open
djebsoft wants to merge 14 commits intoCodeYourFuture:mainfrom
djebsoft:quote-generator
Open

London | 26-ATP-Jan | Boualem Larbi Djebbour | Sprint 3 | Quote generator#1200
djebsoft wants to merge 14 commits intoCodeYourFuture:mainfrom
djebsoft:quote-generator

Conversation

@djebsoft
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

creating a quote generator application

Questions

@djebsoft djebsoft added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 15, 2026
Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment thread Sprint-3/quote-generator/index.html Outdated
@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 16, 2026
@djebsoft djebsoft added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 16, 2026
Comment thread Sprint-3/quote-generator/quotes.js Outdated
@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 16, 2026
@djebsoft djebsoft added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Apr 16, 2026
Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +1 to +5
function setup() {
const randomQuote = pickFromArray(quotes);
document.querySelector("#quote").innerText = randomQuote.quote;
document.querySelector("#author").innerText = randomQuote.author;
}
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.

The function name does not quite match the task being performed.

Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +6 to +9
function newQuote() {
document.getElementById("new-quote").addEventListener("click", setup);
}
newQuote();
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.

Statements on lines 7 and 9 are the run-on-load tasks. They are the operations "setup()" should be performing.

@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 16, 2026
@djebsoft djebsoft removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Apr 16, 2026
@djebsoft djebsoft added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 16, 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.

All good.

Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +6 to +10
function setup() {
document.getElementById("new-quote").addEventListener("click", randomQuote);
}
setup();
window.addEventListener("load", randomQuote);
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.

You can also consider write:

 function setup() {
  // All tasks to be performed once on page load
  document.getElementById("new-quote").addEventListener("click", randomQuote);
  randomQuote();
}

// Setup "setup()" to be called on page load
window.addEventListener("load", setup);

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.

done, thanks for the clarification

@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. labels Apr 17, 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