[Solved] Which is better, or is it simply for presentation?


If you mean, which is better for readability, this:

if (condition) {
   // do something
   return true;
}

// do something else
return false;

Or this:

if (condition) {
   // do something
   return true;
} else {
   // do something else
   return false;
}

Definitely the first one is better for readability.

Logically, they’re equivalent.

1

solved Which is better, or is it simply for presentation?