State two points of distinction between if-else and conditional operator.
Answers
Answered by
4
Explanation:
The difference is the ternary operator is an expression where as an if-then-else is a statement. The basic difference is an expression returns a value and a statement doesn't so the ternary operator can be used in places that an if statement can't.
Answered by
1
Answer:
The difference is the ternary operator is an expression where as an if-then-else is a statement. The basic difference is an expression returns a value and a statement doesn't so the ternary operator can be used in places that an if statement can't.
Similar questions