Skip to content

London | 26-ITP-Sep | Hanna Bohlin | Sprint 2 | Sprint 2 exercises - #1547

Open
habohlin wants to merge 29 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-2-Coursework
Open

habohlin wants to merge 29 commits into
CodeYourFuture:mainfrom
habohlin:Sprint-2-Coursework

Conversation

@habohlin

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

Task code

CYF-1083

Changelist

Completed the exercises in sprint 2.

@github-actions

This comment has been minimized.

@habohlin habohlin added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 18, 2026
Comment thread Sprint-2/implement/querystring.js Outdated
throw new Error("parseQueryString requires a string");
}

queryString = decodeURIComponent(queryString);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What happens to name=Sam%26Lee after the whole string is decoded and then split on &?

To "like" or "dislike" this comment, please follow this link

Comment thread Sprint-2/implement/lookup.js Outdated
function createLookup() {
// implementation here
function createLookup(codes) {
if (!codes || !Array.isArray(codes[0])) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does the loop produce for [ ["US", "USD"], "CA" ], even though the input is not an array of arrays?

To "like" or "dislike" this comment, please follow this link

Comment thread Sprint-2/implement/querystring.js Outdated
Comment on lines +23 to +24
const key = pair.substring(0, splitIndex).replace("+", " ");
const value = pair.substring(splitIndex + 1).replace("+", " ");

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What value does parseQueryString("name=John+Van+Doe") produce when each call to replace changes only the first +?

To "like" or "dislike" this comment, please follow this link

Comment on lines +2 to +6
if (
Array.isArray(obj) ||
typeof obj === "string" ||
typeof obj === "number" ||
!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.

What does contains(true, "x") do, and does it follow the function's non-object error contract?

To "like" or "dislike" this comment, please follow this link

Comment thread Sprint-2/debug/address.js
Comment on lines +10 to +12
// But an object is not iterable and you can't reach a value through an index
// You need to find it using the key, houseNumber
// So I think there will be an error as the code treats address as an array when it is an object.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How does address[0] behave differently from trying to iterate over address?

To "like" or "dislike" this comment, please follow this link

@cyf-ai-code-reviewer cyf-ai-code-reviewer Bot 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 Nov 18, 2026
@cyf-ai-code-reviewer

Copy link
Copy Markdown

The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look.

@habohlin habohlin 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 Nov 27, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant