Why is the conditional operator used as an alternative to if else?
Answers
Answered by
3
You may be wondering why should we use conditional operator if it does the same job as if-else statement. The main purpose of using it is to make code shorter and more readable. For simple conditions, you can evaluate it in a single line with less code than if-else.
pawankumar856:
Mark as brainiest
Answered by
0
Answer:
to make code shorter and easier to understand. hope it helps
Similar questions
Science,
6 months ago
Science,
6 months ago
Math,
1 year ago
Physics,
1 year ago
Political Science,
1 year ago