What is the main difference between if...else and ternary operator? If your answer is that the ternary operator is a shorthand of if...else, then you should read this article till the end. Because that is not the main difference between them. The mai...