āœ”||šŸ¤¢ Commit or Vomit | nested ternary operator

šŸ¤šŸ„‡ Jasper de Jager - May 4 '21 - - Dev Community

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
    );
Enter fullscreen mode Exit fullscreen mode

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

. . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player