Difference between ternary Operator and If else

So, what are the difference between the two statement write above?

The syntax is the only difference I realize so far.

Yes it’s just the syntax, no difference or overhead in performance, just readability vs line count number.