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
JavaScript
0/50 solved · 0%
All lessons
lesson
code
Advanced · hard
38. Generators
Pause and resume a function.
Write `function* blockNumbers(start)` yielding `start`, `start+1`, … forever.
Required in your answer:
function*
yield
Reveal solution
Run & check
Reset
Runs in a sandboxed worker
// TODO function* blockNumbers(start)
Output appears here.
← 37. formatUnits by hand
39. Custom iterables →