Javascript – Why is Ternary Operator Considered an Expression and not a Statement?
I know that an expression produces a value while a statement is an action. However, I don't understand why the ternary operator falls under the category of an expression. From what I understand, the ternary operator is simply a shorthand…