The ternary operator can be confusing, as it dehydrates the longer if/else code blocks into a single line of code. It eliminates the repeating pattern. But what about the
?: syntax? How does that work? When should you use it?
Check out the other syntax here.
Did you learn something new? Share your thoughts.