Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Ports - Amy W #35

wants to merge 1 commit into from

Conversation

amythetester
Copy link

No description provided.

@JansenMartin
Copy link

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! :)

@shrutivanw
Copy link
Collaborator

Nice work! 👍

return true
elsif array1 == nil || array2 == nil || array1.count != array2.count
return false
else

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

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.

Copy link

@sloekito sloekito left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants