NW6 | Nohe-Tekelmariyam | JS1-Module | Week-3#185
NW6 | Nohe-Tekelmariyam | JS1-Module | Week-3#185nohetekelmariyam wants to merge 1 commit intoCodeYourFuture:mainfrom
Conversation
bunday
left a comment
There was a problem hiding this comment.
Well done, there area couple of places to fix, and this will be good for a review again.
| // Identify Reflex Angles: | ||
| // When the angle is greater than 180 degrees and less than 360 degrees, | ||
| // Then the function should return "Reflex angle" | ||
| function getAngleType(Angles) { |
There was a problem hiding this comment.
start your variable name with a small letter, i.e angles instead of Angles
| return "Acute angle"; | ||
| } else if (Angles == 180) { | ||
| return "Straight angle"; | ||
| } else if (Angles > 180 && AngleS < 360) { |
There was a problem hiding this comment.
your variable name is not AnglesS change that, this code wont run
| return "it's not angle"; | ||
| } | ||
| } | ||
| var AngleS = 350; |
There was a problem hiding this comment.
small letter for starting variable name. Also use const to declare a variable if the value will never change
|
|
||
| // These acceptance criteria cover a range of scenarios to ensure that the isProperFraction function handles both proper and improper fractions correctly and handles potential errors such as a zero denominator. | ||
| function isProperFraction(numerator, denominator) { | ||
| if (numerator >= denominator && denominator != 0) { |
There was a problem hiding this comment.
you should take care of error first, check if the denomiator is 0 then return an error, then go to do the next check.
| if (numerator >= denominator && denominator != 0) { | ||
| return "false"; | ||
| } else if (numerator < denominator) { | ||
| return "True"; |
There was a problem hiding this comment.
a boolean true does not start with a capital letter
| ) { | ||
| return "false"; | ||
| } else { | ||
| return "turn"; |
| side1 + side2 <= side3 || | ||
| side1 + side3 <= side2 || | ||
| (side2 + side3 <= side1 && side1 <= 0) || | ||
| side2 <= 0 || |
There was a problem hiding this comment.
why is there no standalone check for side1 <= 0 ?
| function formatAs12HourClock(time) { | ||
| const clockHourIn12 = Number(time.slice(0, 2)); | ||
| if (clockHourIn12 > 12) { | ||
| return `${clockHourIn12 - 12}:00 pm`; |
There was a problem hiding this comment.
if a value like 18:46 is send in here, the result according to your code will be 6:00pm which is wrong. Also is the time send is 09:00 the result will be 09:00 without the am appended. You need to take care of these cases
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.