One of the most important ideas in software development is: keep it simple.
The problem is, every developer tends to believe all code they write is simple (... of course).
The example below shows how to write simple, modular & testable code by following 2 rules:
1. Restricting your functions to single-purpose.
AND
2. Accept only 1 argument. This can be an array or object with many dimensions - prefer less data-heavy values - regardless of 'reference passing'.
This is an example of function composition without frameworks/libraries.
Pure ES2016.