-
-
Notifications
You must be signed in to change notification settings - Fork 197
WM | 25-ITP-May | Nahom Mesfin | Sprint 3 coursework #677
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?
WM | 25-ITP-May | Nahom Mesfin | Sprint 3 coursework #677
Conversation
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.
Good start, but you may want to take more time to work on this sprint - there are a few tasks that have problems.
@@ -9,6 +9,7 @@ | |||
|
|||
function isProperFraction(numerator, denominator) { | |||
if (numerator < denominator) return true; |
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.
What happens if I call isProperFraction(-70,5)?
-70/5 is not a proper fraction.
if (rank === "A") return 11; | ||
if (rank >= '2' && rank <= '9') return Number(rank); |
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.
What happens if I call getCardValue("222♥")?
@@ -1,5 +1,11 @@ | |||
function countChar(stringOfCharacters, findCharacter) { | |||
return 5 | |||
let count = 0; |
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 is very minor - try to keep the indentation the same for all the code. here your first declaration is indented further.
@@ -1,5 +1,8 @@ | |||
function getOrdinalNumber(num) { |
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.
In english we would say "21st" - can you make your code work in these general cases too?
function repeat() { | ||
return "hellohellohello"; | ||
function repeat(str, count) { | ||
return str.repeat(count); |
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.
What about your error condition you are testing for?
Learners, PR Template
Self checklist
Changelist
In Implement, I wrote functions step-by-step with assertions to cover different cases. In Rewrite, I converted previous assertions to use Jest syntax for clearer and easier testing. In Practice I built and ran tests using Jest and vscode's code runner to ensure all functions meet requirements.