Skip to content

LONDON | May-2025 | Aida Eslamimoghadam| Module-Structuring-and-Testing-Data | Sprint-3 #578

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

aydaeslami
Copy link

@aydaeslami aydaeslami commented Jun 20, 2025

Self checklist

  • I have committed my files one by one, on purpose, and for a reason

  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME

  • I have tested my changes

  • My changes follow the style guide

  • My changes meet the requirements of this task

  • Completed all tasks mentioned in the requirements

  • Reviewed the implementation with ChatGPT to ensure correctness

UPDATE

Hi CJ,
Thanks for your reviews and suggestions. I’ve updated my code. Please let me know if I need to change anything else.
Thanks a million!

Changelist

  • Updated tests to use loops and scenario lists
  • Added more test scenarios
  • Added Invalid angle cases

@aydaeslami aydaeslami changed the title Sprint3 LONDON | May-2025 | Aida Eslamimoghadam| Module-Structuring-and-Testing-Data | Sprint-3 Jun 20, 2025
@aydaeslami aydaeslami added Needs Review Participant to add when requesting review 📅 Sprint 3 Assigned during Sprint 3 of this module labels Jun 20, 2025
@fernandamelov fernandamelov added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Jul 8, 2025
Comment on lines +6 to +7
const number = parseInt(rank);
if (number >= 2 && number <= 9) return number;
Copy link
Contributor

Choose a reason for hiding this comment

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

In JavaScript, strings that represent valid numeric literals in the language can be safely converted to equivalent numbers or parsed into integers. For examples, "0x02", "2.1", or "00_02".

Does your function return the value you expected from each of the following function calls?

getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("00_02♠");

getCardValue("2XYZ♠");

Copy link
Author

Choose a reason for hiding this comment

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

This code returns 2 for ‘0x02♠’, ‘2.1♠’, and ‘2XYZ♠’, but it throws an error for ‘00_02 because it can’t read underscores (00_02) ==> becomes NaN, so it gives an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Should any of them of them be treated as valid card rank?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Needs Review Participant to add when requesting review Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 9, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jul 9, 2025

@fernandamelov I am sorry that I didn't notice the "Review in progress" label when I started the review.

@aydaeslami aydaeslami added the Needs Review Participant to add when requesting review label Jul 10, 2025
@cjyuan
Copy link
Contributor

cjyuan commented Jul 10, 2025

Changes look good. Well done.

Sprint-3/2-mandatory-rewrite/3-get-card-value.js could still use some improvement if you want to consider those ranks I suggested as invalid. I will go ahead and mark this PR as complete first.

I won't get notified when you changed the PR description, and I almost missed what you changed in the PR description.

Leaving comments and changing labels will do. If needed, you can also tag me.

@cjyuan cjyuan added Complete Volunteer to add when work is complete and review comments have been addressed and removed Needs Review Participant to add when requesting review Reviewed Volunteer to add when completing a review labels Jul 10, 2025
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 review comments have been addressed 📅 Sprint 3 Assigned during Sprint 3 of this module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants