Because it gives you the opportunity to descriptively name the expression, sparing others from parsing it mentally.
The strange part is testing Boolean value... to return the same value as Boolean constants.
Why wasn't the Boolean result simply returned directly?
var condn = ...;
return condn;
The if statement isn't necessary. Even if you wanted to explicitly return only "true" or "false" - using the if statement to convert truthy and falsy results into true booleans - using double not operators removes q potentially mispredicted branch. var condn = ...;
return !!condn;Oh, sorry, didn't see the !