Sorry for my english, i just try to prove my point.
Why do standards say that IF statements have to be written like following:
if (a === b) { <-- starts with scope "name/statement"
} else { <-- Another scope with scope "name/statement" is added right after end of if scope.
}
and not like
if (a === b) { <-- starts with scope "name/statement"
}
else { <-- starts with scope "name/statement"
}
Second one seems more logical to me (and lots cleaner ofc)
When i want to seperate different logics i'll add new line between.
if () {
}
else {
}
if() {
}
Some references:
Aucun commentaire:
Enregistrer un commentaire