DEV Community

Discussion on: 3 clean code principles for the functional programming beginner

Collapse
 
morgenpeschke profile image
Morgen Peschke

I see what he's getting at.

I don't like how he explained it.

The idea that the doggos variable shouldn't be duplicated is pretty self-evident, as it's both constant and effectively an additional helper function.

I doubt it belongs in the global scope, but it's reasonable to put it into the same scope as the functions that use it.

Collapse
 
ayabongaqwabi profile image
Ayabonga Qwabi

You are right it is a constant, I just wanted to highlight the duplication part from a beginners perspective