DEV Community

Discussion on: JavaScript Quick Tip: Named functions for sane debugging

Collapse
 
beernutz profile image
beernutz

I wonder if there is any downside to doing this? Is the function instantiated differently? Does it use more memory? Either way I DO like the idea.

Collapse
 
sunnysingh profile image
Sunny Singh

I don't think there are performance downsides to using named functions except in scenarios where you want to micro-optimize within a framework or tool. Even if there are, a compiler or minifier can surely fix that without having to manually change your code.