we're implementing a new Javascript framework at work (http://app.igaro.com) where the author has inlined many of his return statements. Take https://github.com/igaro/app/blob/master/compile/js/core.language.js as an example.
My boss has told me not to do follow this approach, but can give no reason for doing so, other than he prefers the look of expanded code. Which is considered best practice?
if (dosomething) return 30;
if (trythis) return 20;
return false;
-v-
if (dosomething) {
return 30;
} else if (trythis) {
return 20;
} else {
return false;
}