Syntactic sugar in C – (ab)using “for” loops
zserge.com
zserge.com
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...https://developer.mozilla.org/en-US/docs/Web/API/Element/cla...
Property Accessors (Bracket Notation):
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
Conditional (ternary) Operator:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...