Skip to content

Conversation

@saff-coder
Copy link

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

I have completed tasks as required.

@saff-coder saff-coder added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 3, 2025
@jennethydyrova jennethydyrova 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 Nov 3, 2025
Copy link
Contributor

@jennethydyrova jennethydyrova left a comment

Choose a reason for hiding this comment

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

Hi @saff-coder! Really great job on this PR. I left couple of comments that need to be addressed but overall, very high quality work.

Can you please remove unrelated files from this PR? You should commit only relevant files to keep PR clean.

return "Reflex angle";
}
else {
return "Invalid angle"; // Optional: handles 0 or ≥ 360
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment is a bit misleading. Is this optional or default? Those are two different things.

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 removed line 32, there was no need to add an Invalid angle

Copy link
Contributor

Choose a reason for hiding this comment

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

You should keep it, it's a nice default case or it could be a good if condition to catch invalid values for angle parameter. Either way, you should have one of them. Think of it this way, if your angle value is 500 or -1, how will your function behave?

const reflex = getAngleType(270);
assertEquals(reflex, "Reflex angle");

//console.assert(reflex === "Reflex angle", `Expected ${reflex} to equal Reflex angle`);
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's remove any scratch work that doesn't contribute to PR to keep it clean and focused.

// What other scenarios could you test for?
const negativeDenominator = isProperFraction(3, -5);
assertEquals(negativeDenominator, true);
const bothNegative = isProperFraction(-2, -6);
Copy link
Contributor

Choose a reason for hiding this comment

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

looks like this one is missing assert

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 added the assert

if (rank === "A") {
return 11;
}
if (["J", "Q", "K", "10"].includes(rank)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is correct but you could have this block as else if because it's a continuation of the same logic. Something to note for future

expect(getCardValue("9♥")).toEqual(9);
});
// Case 3: Handle Face Cards (J, Q, K):
// Case 4: Handle Ace (A):
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you are missing this test case. Could you please add it?

@jennethydyrova jennethydyrova 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 Nov 3, 2025
@saff-coder saff-coder added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Nov 4, 2025
@jennethydyrova
Copy link
Contributor

Looks good to me @sofayas, nice work!

As a side note, can you please install prettier and make sure it formats your code correctly from next PR onward?

@jennethydyrova jennethydyrova 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 Nov 5, 2025
@saff-coder
Copy link
Author

Thank you Jennet, for all your help and advice

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