-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
NW6 | Pedro Ricciardi | JS1 Module | [TECH ED] Complete week 3 exercises | Week 3 Backlog #156
base: main
Are you sure you want to change the base?
NW6 | Pedro Ricciardi | JS1 Module | [TECH ED] Complete week 3 exercises | Week 3 Backlog #156
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.
I really like what you've done. A comment I started making and then realised I'd have to repeat it a lot of times, so stopped, is that a lot of the time you are using else
when you don't really need to. This is a style point rather than a functional change, but you will probably find your code more readable in the long term if you treat else
with suspicion and ask yourself if you really need it.
…e last if else from the function
…cludes method to check the vowel inside an array
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.
Great job!
@@ -21,3 +21,37 @@ | |||
// 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(angle) { | |||
if (angle >= 360 || angle <= 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.
360
itself is not an invalid angle
@@ -29,3 +29,46 @@ | |||
// 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." | |||
|
|||
function getCardValue(card) { |
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.
clean solution
Self checklist
Changelist
All tasks done. Implemented assertions, improved code using a function to create an assertion pattern, used methods to manipulate strings and numbers, used 'switch' instead of 'if' for cleaner code, used methods to check data type, and worked with Unicode characters.