Yashotantra Academy
AI · Blockchain · Cloud · Data
Dark mode active
Learn
Tracks
ABCD
Certification
More
▾
Dark mode active
Learn
Tracks
ABCD
Certification
Study
Theory
Code Lab
Build
Solidity IDE
Staking Sandbox
Simulation
Reference
Wallets
Gas Fees
Explorers
← Code Lab
React Native
0/50 solved · 0%
All lessons
lesson
code
Fundamentals · easy
14. Guarding numeric && rendering
Avoid the classic `{0 && <X/>}` bug.
Write `shouldRenderBadge(count)` returning `true` only when `count` is a number greater than 0 (not just truthy).
Required in your answer:
> 0
Reveal solution
Run & check
Reset
Transpiled, then run in a sandbox
function shouldRenderBadge(count) { // TODO }
Output appears here.
← 13. usePrevious logic
15. Selecting environment config →