DEV Community

Discussion on: How do you order your functions?

Collapse
 
savagepixie profile image
SavagePixie

I do a mix of alphabetical and abstraction order.

At the top I put all the helper functions sorted alphabetically and at the bottom the functions that the module exports (also sorted alphabetically).

For the same reason, I hate having to hunt functions up and down. Alphabetical order makes it much easier.