DEV Community

Discussion on: Is functional programming in JS really worth it?

Collapse
 
taufik_nurrohman profile image
Taufik Nurrohman

Functional programming in JavaScript is optimal for production code e.g. when minified inside IIFE, because function name can be renamed. You cannot minify object property.

isOdd(x)
Enter fullscreen mode Exit fullscreen mode

vs.

x.isOdd()
Enter fullscreen mode Exit fullscreen mode