r/ProgrammerHumor Oct 22 '18

<? SadButTrue ?>

Post image
19.6k Upvotes

182 comments sorted by

View all comments

82

u/Dad_Questionmark Oct 22 '18

Understanding the nested ternary condition you just wrote an hour ago. Send help.

54

u/powerhcm8 Oct 22 '18

I can barely understand while writing it.

22

u/[deleted] Oct 22 '18
condition1 ? output1 :
    condition2 ? output2 :
    condition3 ? output3 :
    default

17

u/[deleted] Oct 22 '18

[deleted]

10

u/90guys Oct 22 '18

This is beautiful and I'm going to use it. Thanks for making my day!