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

Useless else condition #5

Closed
altunyurt opened this issue Sep 17, 2015 · 0 comments
Closed

Useless else condition #5

altunyurt opened this issue Sep 17, 2015 · 0 comments

Comments

@altunyurt
Copy link
Collaborator

https://github.com/pharzan/InstaTinder/blob/master/instatinder.js#L65

"if" condition already has a return in it, therefore "else" is useless. If the 'if' condition does not match, it will continue to execute whatever is in else. If the 'if' condition matches, then it will execute the if's body and will return from there, without looking at the rest of the function.

@pharzan pharzan closed this as completed Sep 18, 2015
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

No branches or pull requests

2 participants