Skip to content

London | 26-ITP-May | Dagim Daniel | Sprint 3 | Quote-generator - #1333

Open
Dagim-Daniel wants to merge 2 commits into
CodeYourFuture:mainfrom
Dagim-Daniel:Sprint3/quote-generator
Open

London | 26-ITP-May | Dagim Daniel | Sprint 3 | Quote-generator#1333
Dagim-Daniel wants to merge 2 commits into
CodeYourFuture:mainfrom
Dagim-Daniel:Sprint3/quote-generator

Conversation

@Dagim-Daniel

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

quote_generator task under sprint 3 has been done

@Dagim-Daniel Dagim-Daniel added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. labels Jul 28, 2026
Comment thread Sprint-3/quote-generator/index.html
Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +495 to +497
const areaOfQuote = document.querySelector("h1");
const shufflebutton = document.querySelector("#new-quote");
const AreaOfQuoteBy = document.querySelector("h3");

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.

  • Better to use meaningful id or class names instead of relying on h1 and h3.

  • Is your text editor showing AreaOfQuoteBy and the other variable names in different colors. If so, do you know why?

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.

my editor showing me with the same colors to the others

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.

Are you using VS Code? On GitHub, this is how they look like:

const shufflebutton = document.querySelector("#new-quote");
const AreaOfQuoteBy = document.querySelector("h3");

What I wanted to point out is that the naming convention for variables in JS is lower camel case.

Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +505 to +506
areaOfQuote.textContent = `" ${quot} "`;
AreaOfQuoteBy.textContent = `- ${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 leading " and - appear to be for styling purposes. Keeping them in HTML or CSS could makes it easier to style or modify the view. This allows front-end developers to adjust the UI without changing any JavaScript code.

Comment thread Sprint-3/quote-generator/quotes.js Outdated
];

// getting access from the html
const showquote = document.querySelector("displayArea");

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.

Where is this variable being used?

Comment thread Sprint-3/quote-generator/quotes.js Outdated
Comment on lines +508 to +512
//console.log(quoteGenerator);
//console.log(quot);
//console.log(Author);
quoteGenerator();
//event handler

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.

Best practice is to remove all unused code and unnecessary comments to keep the code clean.

@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 Aug 3, 2026
@Dagim-Daniel Dagim-Daniel added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 3, 2026

@cjyuan cjyuan left a comment

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.

Changes look good.

Could you also check if all variable names adhere to the lower camel case convention? (I counted at least three names should be updated)

@cjyuan cjyuan removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Groups The name of the module. 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