I have always written my JavaScript blocks
var functionName = function() {
if (someCondition) {
// stuff
} else {
// stuff
}
};
but today I saw
var functionName = function() {
if (someCondition) {
// stuff
return;
}
// stuff
};
I like that the first example is more explicit in the logic. What are some reasons why you would or wouldn't want to do it the second way demonstrated?