Is there any performance difference between the two functions, is one considered more correct? Is there a best practice or rule of thumb I am missing? ExampleB seems more succinct to me and thus more readable, yet the logic does not seem as tightly tied together and is therefore not as explicit.
function exampleA() {
if( true ) {
return //do this;
} else {
return //do that;
}
};
Versus
function exampleB(){
if( true ) {
return //do this;
}
return //do that;
};
Thanks in advance!