πŸ“œ ⬆️ ⬇️

Formatting if – else

Friends, the seemingly provocative headline is not at all aimed at inciting another religious war.
For people who like to format blocks of code, setting the opening brace to a new line, please tactfully bypass this topic side. And others, please share your opinion on how best to format an if – else – block and why.

Option 1:
if (condition) {
…
} else {
…
}


Option 2:
if (condition) {
…
}
else {
…
}

')

Source: https://habr.com/ru/post/48608/


All Articles