-
Notifications
You must be signed in to change notification settings - Fork 47
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
Ports - Amy W #35
base: master
Are you sure you want to change the base?
Ports - Amy W #35
Conversation
Great use of an if-elsif-else statement and complex conditionals! I like how you implemented the "or" operator in line 6. (Normally I shy away from using so many in a row, but it makes sense since you've already checked to make sure BOTH aren't nil). Nice job! :) |
Nice work! 👍 |
return true | ||
elsif array1 == nil || array2 == nil || array1.count != array2.count | ||
return false | ||
else |
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.
You do not need this else
. If you have not returned in line 4 or line 7, you will hit this line.
elsif array1 == nil || array2 == nil || array1.count != array2.count | ||
return false | ||
else | ||
i = 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.
You don't need to initialize i
to 0 since you do that in line 10.
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 work! Very small suggestions for cleaner code.
No description provided.