Reduce Nesting
Code should reduce nesting where possible by handling error cases/specialconditions first and returning early or continuing the loop. Reduce the amountof code that is nested multiple levels.
Bad | Good |
---|---|
|
|
Code should reduce nesting where possible by handling error cases/specialconditions first and returning early or continuing the loop. Reduce the amountof code that is nested multiple levels.
Bad | Good |
---|---|
|
|
本文档使用 BookStack 构建