ESLint and TypeScript's compiler will complain about redeclaring functions. So, there really is no benefit whatsoever in practice. The const option is longer, less easy to scan, and you have to pseudo-declare your functions in the right order.
The only benefit is that it shows newbies that JS has first-class functions. I.e. that you can assign them to variables. Personally, I really don't care for that. First-class aren't that special anymore.
I'll always prefer the declarative option over an imperative one.
3
u/Disgruntled__Goat Apr 01 '17
Why? I was under the impression no one uses
functionat all now.