DEV Community

Discussion on: Named functions vs Functions as variables in JavaScript

Collapse
 
nancyd profile image
Nancy Deschenes

Named functions are more recognizable and readable in stack traces. When you're debugging, that can make a large difference in how many hairs you pull out (or have left at the end).

Arrow notation to me is more useful when the function is "really functional": without side-effect, without impact on internal or external data, and repeatable. I see it more for "spontaneous" functions being passed to high order functions.