Make your Javascript pure

Jack Franklin for A List Apart:

You get referential transparency for free when following the rule of declaring all your data as inputs, and by doing this you eliminate an entire class of bugs around side effects and functions acting unexpectedly.

This should apply to any language where you're building classes with functions.

June 24, 2016  ·  Source