Skip to content

Conversation

@MansoorM11
Copy link

@MansoorM11 MansoorM11 commented Aug 7, 2025

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

Briefly explain your PR.
I completed the exercises for sprint-2 which included degbugging programs, implementing function and test based on set requirement, and leaving comments detailing program execution and where the bug is located within the program.

Questions

Ask any questions you have for your reviewer.

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

Good work - I just have spotted one possible issue in your contains exercise

Choose a reason for hiding this comment

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

What happens if you pass it some input like contains([1,2,3,4], "length") - remember one of your test specifications says it should give false when passed an array

Copy link
Author

Choose a reason for hiding this comment

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

I saw that it returns true because arrays in Javascript has own length property. I managed to refactor my code to take this into account and now it returns false. Thanks

@LonMcGregor LonMcGregor 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 9, 2025
@MansoorM11 MansoorM11 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 Aug 17, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes)

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes)

@MansoorM11 MansoorM11 changed the title Glasgow | May-2025 | Mansoor Munawar | Data Groups| Sprint 2 Glasgow | May-2025 | Mansoor Munawar | Sprint 2 Aug 17, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Data Groups) doesn't match expected format (example: 'Sprint 2', without quotes)

@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

@LonMcGregor
Copy link

This change solves this issue. When implementing things like this in the future, make sure you understand what the program specification is asking for. Here you added a condition that specifically checks for arrays and the property "length". Try re-reading the specification in the test file for that task - can you see how you could improve your implementation?

@LonMcGregor LonMcGregor 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 18, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

@MansoorM11
Copy link
Author

I understood the requirement, but I didn’t realise that arrays are treated like objects and their indices are used as keys. That’s something new I learned today. Thanks! So now the updated code will return false for an array as a parameter.

@MansoorM11 MansoorM11 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 Aug 18, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

@LonMcGregor
Copy link

Great! You are now done with this sprint, you can close the PR now

@LonMcGregor LonMcGregor 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 Aug 18, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Wrong number of parts separated by |s

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.

3 participants