Going back to my one screen-full rule, in JavaScript it is common to have nested functions (due to the way JS closures work), and this can make the containing function longer than I would like if I were using another language, so sometimes the end result is a compromise.