Skip to content

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2|coursework#988

Open
mjm-git185 wants to merge 13 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-2
Open

Glasgow | 26-ITP-Jan| Martin McLean |Sprint 2|coursework#988
mjm-git185 wants to merge 13 commits intoCodeYourFuture:mainfrom
mjm-git185:Sprint-2

Conversation

@mjm-git185
Copy link

Changelist

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
my coursework

@mjm-git185 mjm-git185 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 12, 2026
@WeiTsungCheng WeiTsungCheng added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 15, 2026

Choose a reason for hiding this comment

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

This does not meet the purpose of the question.
The goal of the program is to output the values ​​of all properties in the object.

Copy link
Author

Choose a reason for hiding this comment

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

i have changed this so it only logs the values now

Choose a reason for hiding this comment

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

What problems might arise if the quantity of ingredient changes later (e.g., to 100)?

function createLookup() {
// implementation here
function createLookup(countryAndCurrency) {
const money = new Map(countryAndCurrency);

Choose a reason for hiding this comment

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

why use Map here?

Choose a reason for hiding this comment

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

some edge cases need to be considered

Copy link
Author

Choose a reason for hiding this comment

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

i have made changes to the test for more edge cases, now i need to fix the code to pass the tests

Choose a reason for hiding this comment

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

function tally(arr) has use console.log
why need console.log(tally(["a", "a", "b", "c"])); ???

Copy link
Author

Choose a reason for hiding this comment

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

removed

Choose a reason for hiding this comment

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

why test expect(tally(["a", "b", "a"])).toEqual({ a: 2, b: 1 }); twice?

Copy link
Author

Choose a reason for hiding this comment

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

removed

});

// Given an invalid input like a string
// When passed to tally

Choose a reason for hiding this comment

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

The last test was not finished.

Copy link
Author

Choose a reason for hiding this comment

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

finnised now

@WeiTsungCheng WeiTsungCheng 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 15, 2026
@mjm-git185 mjm-git185 added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 16, 2026
@WeiTsungCheng WeiTsungCheng 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. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Mar 17, 2026
@github-actions
Copy link

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-2/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

2 similar comments
@github-actions
Copy link

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-2/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@github-actions
Copy link

The changed files in this PR don't match what is expected for this task.

Please check that you committed the right files for the task, and that there are no accidentally committed files from other sprints.

Please review the changed files tab at the top of the page, we are only expecting changes in this directory: ^Sprint-2/

If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed).

If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above.

@WeiTsungCheng
Copy link

Great You have fixed

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.

2 participants