Skip to content

London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework - #1287

Open
khaliun-dev wants to merge 18 commits into
CodeYourFuture:mainfrom
khaliun-dev:coursework/sprint-2
Open

London | 26-ITP-May | Khaliun Baatarkhuu | Sprint 2 | Coursework#1287
khaliun-dev wants to merge 18 commits into
CodeYourFuture:mainfrom
khaliun-dev:coursework/sprint-2

Conversation

@khaliun-dev

Copy link
Copy Markdown

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

  • I have learnt to work with objects and arrays, using loops and conditionals.
  • Debugging and implementing code

Questions

None

@khaliun-dev khaliun-dev added 📅 Sprint 2 Assigned during Sprint 2 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Groups The name of the module. labels Jul 24, 2026
@hey-hammad hey-hammad 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 Jul 28, 2026

@hey-hammad hey-hammad 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 effort overall, few changes required

Comment thread Sprint-2/debug/author.js
alive: true,
};

for (const value of Object.values(author)) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This works, but can we do it using only for loop?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yes, done. refactored and commit generated

Comment thread Sprint-2/interpret/invert.js Outdated



describe("invert", () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please fix the errors in this file and move the tests to a separate test.js file.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done, thanks

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi @khaliun-dev, could you please review the file and try running it? There still appears to be some syntax issues. Also, please think about code duplication and how to handle things that are not part of the code.

Nice job moving the tests to a dedicated file. However, looking at the other test files, could you rename this test file to be more descriptive and follow the naming convention used by the other files?

Updated author object and changed iteration method to a for loop.
Removed unit tests for the invert function from invert.js.
Added unit tests for the invert function to verify its behavior with various inputs.
@khaliun-dev

Copy link
Copy Markdown
Author

@hey-hammad i have fixed both issues raised, could you have another look, please?

@hey-hammad hey-hammad 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 Aug 4, 2026
Fix the invert function to correctly swap keys and values in the object.
@khaliun-dev khaliun-dev added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 5, 2026
@khaliun-dev

Copy link
Copy Markdown
Author

@hey-hammad i have renamed the test file and worked out the syntax problem. All tests passed .

@hey-hammad hey-hammad 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 Aug 7, 2026
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. Module-Data-Groups The name of the module. 📅 Sprint 2 Assigned during Sprint 2 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants