Direction: Choose the correct option
Q1.
Can you write an if-else statement directly inside JSX?
Direction: Choose the correct option
Q2.
How can you achieve if-else logic in JSX?
Direction: Choose the correct option
Q3.
What is the output of:
{if (true) 'yes'}
?Direction: Choose the correct option
Q4.
Which approach is best for complex conditional logic in rendering?
Direction: Choose the correct option
Q5.
What does the following code do? let content; if (user) content = ; else content = ; return
{content}
;