I am not sure I agree, consider the following:

function evaluateSomething(arg1, args...) {
var localVar = 0;
arg1.forEach(function(arg1elements) {
// some operation with arg1elements
localVar += operationResult;
return (something else + localVar + arg2 + arg3...etc);

My function is doing one identifiable thing and if split into various functions I think becomes less readable since the context is gone, so I believe good style can’t just originate from a syntactic rule (writing one line functions), but rather from the outset (what is it you are doing and how would you explain it in words) and from there break it down into readable testable chunks, hunting for one line functions that just return one value breaks cadence, so I agree with the general sentiment but think extracting everything might be too much.

Written by

AI, Software Developer, Designer : www.k3no.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store