JavaScript · Junior · Question 63 of 75
What does 0 && "hello" evaluate to?
- ✓Correct answer:
0 - 2
false - 3
"hello"
Explanation
&& returns the first falsy operand or the last one. In JSX, {count && <Badge />} therefore renders 0 when count is 0.