DEV Community

Discussion on: Mastering Functions: How to Write Functions That Will Take Your Skills to the Next Level

Collapse
 
tracygjg profile image
Tracy Gilmore

Hi Max, I really like your post, it contains some sound advice.
One lesson I think we can take from the Functional Programming world is to "keep functions pure". Try to restrict functions to effecting only the data it is passed as parameters to avoid side-effects and make them more testable.
Regards, Tracy

Collapse
 
xshapira profile image
Max Shapira

Thanks, Tracy! Glad you found it helpful.