3 ms·
I agree with everything apart having if and return statement in the same line. It makes code really difficult to read. In addition, I also like is to avoid if/
by barell 9y ago
I agree with everything apart having if and return statement in the same line. It makes code really difficult to read.
In addition, I also like is to avoid if/else when returning bool values:
if (a > b) {
return true;
} else {
return false;
}
Could be simply written as
return (a > b);