Hacker News new | ask | show | jobs
by baron816 2241 days ago
> I've seen a-million-and-one junior developers screw up for-loops, too, with overly complex code that's hard to understand and debug.

Everything can be abused. I see people doing side effects in their mapper callbacks, deeply nesting ternaries and switch and if/else statements, mutating far off objects, and just generally making code way more complex than it needs to be. Usually, this is from junior devs, but not always.

In the right hands, functional programming in JS can be very powerful. It can be easier to reason about (linear data flow, declarative code), and more performant (immutable data structures, transducers). In the wrong hands, it can be even more opaque than imperative, procedural code.