Skip to content

Manchester | 26-ITP-May | Joanne O'Malley | Sprint 2 | Exercises#1247

Open
joanne342 wants to merge 19 commits into
CodeYourFuture:mainfrom
joanne342:sprint2
Open

Manchester | 26-ITP-May | Joanne O'Malley | Sprint 2 | Exercises#1247
joanne342 wants to merge 19 commits into
CodeYourFuture:mainfrom
joanne342:sprint2

Conversation

@joanne342

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

Sprint 2 coursework

@joanne342 joanne342 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jul 14, 2026
@LonMcGregor LonMcGregor added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 20, 2026

@LonMcGregor LonMcGregor left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good start on this task, I've left some comments for you to answer

@@ -1,3 +1,5 @@
function contains() {}
function contains(obj, property_name) {
return property_name in obj;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Does this consider the difference between defined properties and built-in properties?

const splitByAnds = queryString.split("&");

const splitByEquals = splitByAnds.map(x => {
const match = x.match(/^([^=]*)(?:=(.*))?$/);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can you explain what this regular expression is doing?


const counts = {};
for (const item of uniqueItems) {
counts[item] = items.filter(x => x === item).length;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Imagine I had the input of ['a', 'a', 'a', ...] - How many times will .filter run? Is that an optimal solution?

@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. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 20, 2026
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