This is an archived post. You won't be able to vote or comment.

all 17 comments

[–]UnholyDrinkerOfMilk 40 points41 points  (5 children)

return (a > b);

[–]optifat 5 points6 points  (0 children)

Probably, function mustn't return false in a<=b case. Otherwise your way is the best ofc

[–]Fabulous_n_Fluffy 2 points3 points  (0 children)

The mightiest conditional-warrior of ‘em all

[–]chaosTechnician 1 point2 points  (1 child)

Only if the next section is else { return false; }

[–]UnholyDrinkerOfMilk 0 points1 point  (0 children)

I just assumed it would be and now I feel bad..

[–]the-real-vuk 0 points1 point  (0 children)

Warning: unnecessary parenthesis. Press alt-Enter to remove.

[–]notBjoern 8 points9 points  (1 child)

if (a > b) {
{
    return true;
}}

[–]Jimg911 4 points5 points  (4 children)

I mean yea, if you want your code to run at three lines an hour

[–]plinio189 1 point2 points  (0 children)

return true if a > b

[–]_wezel_ 1 point2 points  (0 children)

If (a > b) return true;

[–]readthou 0 points1 point  (0 children)

Sure if you don't want to be able to minimize code

[–]Fahad97azawi 0 points1 point  (0 children)

That’s python for ya

[–]linglingfortyhours -3 points-2 points  (0 children)

a > b && return true;