DEV Community

Discussion on: Keeping Your Code Simple

Collapse
 
codevault profile image
Sergiu Mureşan

I think this only comes down to what the team is used to. If they know how to search MDN and some functional programming then it's also readable. We should use the tools of a language in our own favour.

I would use this code because:

  • It has a small code base (usually easier to maintain)
  • It is more robust (since you are not reinventing the wheel and use what the language has to offer)
  • It is often the cleanest it can get

Not using the tools your language has to offer leaves you with unnecessarily large codebases.

@joelnet 's version looks to be the most readable, that's what I would use.