Switch to Dark Mode

React | Conditional Rendering | Question 3

Last Updated : Jan 31, 2025
Discuss
Comments

Which of the following statements about ternary operators is true in React?

A

Ternary operators can only be used inside return.

B

Ternary operators can be used for conditional rendering in JSX.

C

Ternary operators are not allowed for conditional rendering in React.

D

Ternary operators always require else clause.

Share your thoughts in the comments