Skip to content

Conversation

AdnaanA
Copy link

@AdnaanA AdnaanA commented Oct 6, 2025

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

Change list:

In sum.js I have implemented a function that sums only the numeric elements of an array, ignoring non-numerical values, and handles empty arrays, negatives, and decimals, with tests in sum.test.js.

In max.js I have implemented a function that finds the largest numeric element in an array while ignoring non-numeric values and supporting empty arrays, negatives, and decimals, tested in max.test.js.

In dedupe.js I have implemented a function that removes duplicate values from arrays of numbers or strings, preserving the first occurrence and handling empty arrays, with tests in dedupe.test.js.

In calculateMedian.js I have implemented a function that calculates the median of numeric elements from sorted or unsorted arrays of odd or even length, filtering out non-numeric values, tested in median.test.js.

In includes.js I have refactored the function that checks if a target value exists in an array using a for...of loop, supporting empty arrays, duplicates, and nulls, with tests in includes.test.js.

AdnaanA added 17 commits July 1, 2025 16:59
	modified:   Sprint-1/fix/median.test.js
	new file:   package-lock.json
	new file:   package.json
	modified:   Sprint-1/implement/dedupe.test.js
	modified:   Sprint-1/implement/max.test.js
	modified:   Sprint-1/implement/sum.test.js
	modified:   Sprint-2/debug/address.js
	modified:   Sprint-2/implement/contains.test.js
	modified:   Sprint-2/implement/lookup.test.js
	modified:   Sprint-2/implement/querystring.test.js
	modified:   Sprint-2/implement/tally.test.js
	deleted:    Sprint-2/debug/author.js
	deleted:    Sprint-2/debug/recipe.js
	deleted:    Sprint-2/implement/contains.js
	deleted:    Sprint-2/implement/contains.test.js
	deleted:    Sprint-2/implement/lookup.js
	deleted:    Sprint-2/implement/lookup.test.js
	deleted:    Sprint-2/implement/querystring.js
	deleted:    Sprint-2/implement/querystring.test.js
	deleted:    Sprint-2/implement/tally.js
	deleted:    Sprint-2/implement/tally.test.js
	deleted:    Sprint-2/interpret/invert.js
	deleted:    Sprint-2/package-lock.json
	deleted:    Sprint-2/package.json
	deleted:    Sprint-2/readme.md
	deleted:    Sprint-2/stretch/count-words.js
	deleted:    Sprint-2/stretch/mode.js
	deleted:    Sprint-2/stretch/mode.test.js
	deleted:    Sprint-2/stretch/till.js
	modified:   Sprint-1/implement/sum.test.js
@AdnaanA AdnaanA added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module labels Oct 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant