Hacker News new | ask | show | jobs
by msimpson 3252 days ago
I will never understand why these examples are considered abuse as they exhibit standard behavior.

It's just as if I were to write the following JavaScript:

  node.classList[ isHidden ? 'add' : 'remove' ]( 'hide' );
I'm simply using a ternary and a bit of reflection, but the arguments regarding "correctness" this engenders...
2 comments

And it's even generous of you to call that reflection.
Can you explain a bit further what the code you posted does?