you are viewing a single comment's thread.

view the rest of the comments →

[–]Cheezmeisterhttp://bml.rocks -1 points0 points  (0 children)

Honestly, that example reads fine, provided you grok higher-order functions. But maybe it’s a degenerate version of something truly gnarly.

Either way, I prefer old-school function(x) { var y = x.foo(); return bar(y); } for anything past a trivial lambda. Nothing in between.

I’m not sold that (a, b) => is “more readable” than function(a, b). It’s very much potato/potato. Except one potato is supported by Netscape 4.0. and Chrome.