Skip to content

Conversation

@Abrsh100
Copy link

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

Modification of the html and js file and and writing a new css in style.css file

Questions

No questions

@Abrsh100 Abrsh100 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 19, 2025
@tee4tao tee4tao added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 22, 2025

// call pickFromArray with the quotes array to check you get a random quote
let randomQuote = pickFromArray(quotes);
console.log(randomQuote); // maybe logs { quote: "...", author: "..." }
Copy link

Choose a reason for hiding this comment

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

Always remember to remove console.log before pushing your codes. It is a bad practice having this pushed to production.

Copy link
Author

Choose a reason for hiding this comment

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

Ok, thanks, when i see " DO NOT modify this array, otherwise the tests may break!" i just leave it.

Comment on lines 507 to 508
quoteElement.innerText = `"${randomQuote.quote}"`;
authorElement.innerText = `- ${randomQuote.author}`;
Copy link

Choose a reason for hiding this comment

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

Consider using textContent instead of innerText when setting the quote and author. textContent is generally preferred for performance and consistency because it doesn’t trigger layout calculations and ignores CSS visibility. innerText is useful only when you need to respect rendered styles, which isn’t necessary here since you’re just inserting plain text.

You can read more about innerText and textContent here:
https://www.geeksforgeeks.org/html/difference-between-textcontent-and-innertext/

Copy link
Author

Choose a reason for hiding this comment

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

Ok thanks i will consideded it

const authorElement = document.getElementById("author");
const newquoteButton = document.getElementById("new-quote");

function displayRandomQuote() {
Copy link

Choose a reason for hiding this comment

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

Having a function where you can fetch a quote and update your DOM is good, as it improves code readability and quality. Well-done!

Copy link
Author

Choose a reason for hiding this comment

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

got it

@tee4tao tee4tao added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Nov 22, 2025
@Abrsh100 Abrsh100 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 Dec 1, 2025
Copy link

@bp7968h bp7968h left a comment

Choose a reason for hiding this comment

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

Looks good to me, a small change required. Also I noticed you haven't attempted the stretch task, I would advise you to do so, there is a nice learning opportunity in that task.

<h1 class="greeting">Hello There, Enjoy the Quote</h1>
<div class="quote-box">
<blockquote id="quote"></blockquote>
<p class="author" id="author"></p>
Copy link

Choose a reason for hiding this comment

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

Nice job using the blockquote. Is there better html semantic to denote the author?

@bp7968h bp7968h 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 Dec 3, 2025
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.

4 participants