Switch to Dark Mode

React | Conditional Rendering | Question 3

Last Updated : Aug 6, 2025
Discuss
Comments

Why can {count && <p>{count}</p>} behave unexpectedly when count = 0?

A

It throws an error

B

It still renders 0

C

It doesn’t render anything

D

It duplicates the element

Share your thoughts in the comments