Skip to content

Glasgow | ITP-Jan-26 | Alasdair MacDonald | Sprint 3 | Coursework 3 implement and rewrite#1157

Open
MacDonald91 wants to merge 1 commit intoCodeYourFuture:mainfrom
MacDonald91:coursework/sprint-3-implement-and-rewrite
Open

Glasgow | ITP-Jan-26 | Alasdair MacDonald | Sprint 3 | Coursework 3 implement and rewrite#1157
MacDonald91 wants to merge 1 commit intoCodeYourFuture:mainfrom
MacDonald91:coursework/sprint-3-implement-and-rewrite

Conversation

@MacDonald91
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

Completed the tasks required on the sprint, completed in one sitting due to catching up on course.

Questions

N/A

@MacDonald91 MacDonald91 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 4, 2026
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

This exercise has a second part "2 Rewrite tests with Jest" ==> three more files to be updated.

Comment on lines +43 to +47
const numberValue = Number(rank);

if (numberValue >= 2 && numberValue <= 10) {
return numberValue;
}
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. For examples, "0x02", "2.1", or "0002".

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

getCardValue("0x02♠");
getCardValue("2.1♠");
getCardValue("0002♠");

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Mar 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants