Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upEarly exit vs if else #231
Comments
dcousens
added
the
question
label
Aug 13, 2015
This comment has been minimized.
This comment has been minimized.
|
I prefer case 2, but there's no way to enforce this with eslint, nor do I think we should do that. :) |
feross
closed this
Aug 13, 2015
This comment has been minimized.
This comment has been minimized.
|
No worries, just though I'd bring it up as I had a case of nit picking about it in a recent repository, and it just stirred up an unnecessary discussion. |
lock
bot
locked as resolved and limited conversation to collaborators
May 11, 2018
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
dcousens commentedAug 13, 2015
Case 1
Case 2
IMHO, I find case 2 to be the clearest and cleanest, @feross did you have any thoughts on this? Should we align to either convention? Even if we do, can we do anything about it?
It would have to be consistent for
continue,breakandreturnstatements.