Comment

Comment by ericmo

I find if/else to be more confusing than ternary operators. One of the reasons is that it always defines what the else clause is, while that usually doesn't happen when using if.

I'd agree that someone who is not used ternary operators might be confused with this, as I have been before, but I find it to be much cleaner now that I've been using it. It's also a little harder to debug.

parent ericmo 9 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton