Skip to content

Birmingham | ITP Jan 2026 | Arunkumar Akilan | Sprint 1 | Data Groups#992

Closed
arunkumarakilan wants to merge 6 commits intoCodeYourFuture:mainfrom
arunkumarakilan:coursework/Sprint1
Closed

Birmingham | ITP Jan 2026 | Arunkumar Akilan | Sprint 1 | Data Groups#992
arunkumarakilan wants to merge 6 commits intoCodeYourFuture:mainfrom
arunkumarakilan:coursework/Sprint1

Conversation

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

Completed Sprint 1 – Data Groups coursework.

Implemented and tested the following exercises:

Fix

  • Fixed issues in median.js and ensured all tests pass.

Implement

  • dedupe – removes duplicate values from arrays
  • max – returns the largest number in an array while ignoring non-numeric values
  • sum – calculates the total of numeric values while ignoring non-numeric values

Refactor

  • Refactored includes function to use a for...of loop.

All provided Jest tests are passing.

The stretch exercise (Advent of Code) is not included in this PR.


Questions

None at the moment.

@arunkumarakilan arunkumarakilan added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 11, 2026
@jayshreehajgude2012 jayshreehajgude2012 added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Mar 16, 2026
Copy link
Copy Markdown

@jayshreehajgude2012 jayshreehajgude2012 left a comment

Choose a reason for hiding this comment

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

check dedupe(list) function for empty array data validation.
check indentation.

@jayshreehajgude2012 jayshreehajgude2012 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 Mar 16, 2026
@arunkumarakilan
Copy link
Copy Markdown
Author

check dedupe(list) function for empty array data validation. check indentation.

Thanks for the feedback! I checked the dedupe(list) function to ensure it correctly handles empty arrays and fixed the indentation.

@arunkumarakilan arunkumarakilan removed the Reviewed Volunteer to add when completing a review with trainee action still to take. label Mar 16, 2026
@@ -1 +1,17 @@
function dedupe() {}
function dedupe(list) {
if (list.length=== 0)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Do you need this special case? If you removed the if (list.length === 0) check here, what would break?

Comment on lines +25 to +27
("array with no duplicate should return copy of original", ()=>{
let list = [1,2,4,6,9,8];
expect(dedupe(list)).toEqual([1,2,4,6,9,8]);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"copy" is an interesting word here - are you testing that it returns a copy? If your function just did return list; would your test start failing?

@illicitonion illicitonion 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 23, 2026
@illicitonion
Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

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.

3 participants