ā||š¤¢ Commit or Vomit | nested ternary operator
š¤š„ Jasper de Jager
Posted on May 4, 2021
The ternary operator
It's a delight to use them but should we use them as much as possible? what do you think about the next example? ā||š¤¢
H = (C == 0 ? null :
V == r ? (g - b) / C :
V == g ? (b - r) / C + 2 :
(r - g) / C + 4
);
nested ternary operators ā||š¤¢?
ā¤: Commit (I'd commit something like this)
š·: Vomit (we all know unicorns don't vomit)
š¦: Like your post please continue this series!
Let's vote! š
Photo by Science in HD on Unsplash
š šŖ š
š©
š¤š„ Jasper de Jager
Posted on May 4, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.