Skip to content

Comment on Node.js Best Practicesparent

Comments

I interpret 'Avoid closures' as just don't define a function within your function. Private functions are simply functions that haven't been exported and aren't really closures (if we're talking about using a module pattern, at least).

Excessive closures can lead to memory leaks. Anonymous closures are a PITA when debugging.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.