4 ms·
if (!same) { return; } if (!number) { return; } if (!of_braces) { return; } println("but easier to read")
by muti 1y ago
if (!same) {
return;
}
if (!number) {
return;
}
if (!of_braces) {
return;
}
println("but easier to read")
- esafak 1y agoYes, you should definitely unnest functions and exit early. But the null-coalesced version is shorter still.