Birmingham | 26-ITP-May | Toluwalase Tiamiyu | Sprint 3 | Coursework#1447
Birmingham | 26-ITP-May | Toluwalase Tiamiyu | Sprint 3 | Coursework#1447TTiamiyu wants to merge 8 commits into
Conversation
…types and invalid cases
…ases and various scenarios
LonMcGregor
left a comment
There was a problem hiding this comment.
Good work, just one minor comment from me
|
|
||
| function isProperFraction(numerator, denominator) { | ||
| // TODO: Implement this function | ||
| if (denominator === 0) { |
There was a problem hiding this comment.
Is there a way you could combine this condition with the one below?
There was a problem hiding this comment.
Hi, could you please clarify the comment for me, do you mean combining it with the "module.exports = isPropperFraction" ?
There was a problem hiding this comment.
Sure. Here you have two boolean checks. First, your condition in if (denominator === 0). Then below that you also have Math.abs(numerator) < Math.abs(denominator). These both have separate return statements. Is there a way these could all be combined into a single return, without the need for an if?
There was a problem hiding this comment.
Thank you for the clarification, i understand now, i have found a way to combine the conditions with '&&'.
There was a problem hiding this comment.
my last commit addresses the comment, please check and let me know what you think
Learners, PR Template
Self checklist
Changelist
Questions
None