Do not write:
func () {
if (something)
return true;
return false;
}
Instead write:
func () {
if (something)
return true;
else
return false;
}
Do not write:
func () {
while (somehing)
if (somethingelse)
break;
}
Instead write:
func () {
while (somehing)
if (somethingelse)
return;
}
These are my current best practices, what do you think?
Top comments (0)