-
Notifications
You must be signed in to change notification settings - Fork 12
Brussels | ITP-2025-1 | Daniela Fajardo | Sprint 3 | Coursework/sprint 3 2 practice tdd #54
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
base: main
Are you sure you want to change the base?
Conversation
| if (numerator < denominator) { | ||
| return true; | ||
| } | ||
| if (numerator > denominator) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
those ifs are unnecessary, because after the first if fails, its obvious that it is either equal or bigger.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only return false; was enough. But not a big issue
| const numRank = Number(rank); //to convert any numeric string in an actual numeric value. Example: "5" !== 5 | ||
| if (rank == "A") { | ||
| return 11; | ||
| } else if (rank === "J" || rank === "Q" || rank === "K") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add rank 10 also please.
| // Given a card with an invalid rank (neither a number nor a recognized face card), | ||
| // When the function is called with such a card, | ||
| // Then it should throw an error indicating "Invalid card rank." | ||
| const invalidCard1 = getCardValue("10Q"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would fail no?
Learners, PR Template
Self checklist
Exercise solutions sprint 3 practice tdd