Skip to content

WESTMIDLANDS | ITP-MAY-25 | AHMADEHSAS | SPRINT-2 | DATA GROUPS #756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ahmadehsas
Copy link

@ahmadehsas ahmadehsas commented Aug 9, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist:

Completed all the mandatory tasks.

Questions

Ask any questions you have for your reviewer.

@ahmadehsas ahmadehsas added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 9, 2025
@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. 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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 11, 2025
@LonMcGregor
Copy link

It looks like there are a lot of files included here - from multiple sprints. Can I just confirm which ones you wanted reviewed?

@ahmadehsas
Copy link
Author

ahmadehsas commented Aug 11, 2025 via email

@LonMcGregor LonMcGregor added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Aug 12, 2025
Copy link

@LonMcGregor LonMcGregor left a comment

Choose a reason for hiding this comment

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

Hi, I've reviewed sprint 2 now. If the sprint 1 files are not meant to be there, can you remove them from the pull request please? Also, can you fix the package-lock.json file - if you didn't intentionally change that file, it should not have any changes comitted.

For sprint 2, you have made a good start, but I have some follow up questions for you to answer

// This means that we need to check if the property belongs to the object using hasownproperty whenever we loop through an object with the `for ... in` loop.

for (const key in author) {
if (author.hasOwnProperty(key)) {

Choose a reason for hiding this comment

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

What are you using hasOwnProperty to do here?

${recipe}`);
// Here we add `join("\n") to the ingredients array to log each ingredient in a new line.
console.log(
`${recipe.title} serves ${

Choose a reason for hiding this comment

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

Is there a reason you wrote the recipe.serves variable over multiple lines?


// Given invalid parameters like an array
// When passed to contains
// Then it should return false or throw an error
test("contains on an array returns false", () => {
expect(contains([1, 2, 3], 4)).toBe(false);

Choose a reason for hiding this comment

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

What happens if you test for something like contains([1,2,3,4], "length")?


// d) Explain why the current return value is different from the target output
// because it returns the [key, value] of an object in reverse order [value,key]

Choose a reason for hiding this comment

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

I think this question was asking why the original output of this program was not what was expected (before you fixed it) - can you explain why you made the change you did and what the mistake was?

@LonMcGregor LonMcGregor 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 Aug 12, 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.

2 participants