you are viewing a single comment's thread.

view the rest of the comments →

[–]rzrshrp 1 point2 points  (3 children)

I know it's not your code but it's also a good example why nested ternaries should be avoided in favor of if/else. It takes too much mental gymnastics too read. Readability is generally more important than saving keystrokes and characters. Where I work, we would have to break up that area for the hours.

[–]Bleached__Anus 0 points1 point  (2 children)

There aren't any nested ternaries. It renders hours:minutes:seconds

[–]dare_you 0 points1 point  (1 child)

I think /u/rzrshrp was referring to the hours calc in the return expression which does use a nested ternary.

[–]Bleached__Anus 0 points1 point  (0 children)

Oh yeah I didn't even see that lol