|
|
|
|
|
by nousermane
1112 days ago
|
|
> writing "return condition" instead of "if condition then return true else return false end" > using the conditional-value ("ternary") operator in any capacity Looks like author of some code I had to comb through recently, maybe had that among guidelines. Said code was replete with: if(function_that_returns_boolean()){
return true;
}else{
return false;
}
...and... if(foo()){
return true;
}else{
if(bar()){
return true;
}else{
return false;
}
}
|
|
Why stop there?